Przeglądaj źródła

fixed minor copy/paste error

Sebastian Stenzel 9 lat temu
rodzic
commit
3dcebb1e1f

+ 1 - 1
main/filesystem-crypto/src/main/java/org/cryptomator/crypto/engine/impl/CryptorImpl.java

@@ -86,7 +86,7 @@ class CryptorImpl implements Cryptor {
 			randomSource.nextBytes(randomBytes);
 			encryptionKey = new SecretKeySpec(randomBytes, ENCRYPTION_ALG);
 			randomSource.nextBytes(randomBytes);
-			macKey = new SecretKeySpec(randomBytes, ENCRYPTION_ALG);
+			macKey = new SecretKeySpec(randomBytes, MAC_ALG);
 		} finally {
 			Arrays.fill(randomBytes, (byte) 0x00);
 		}

+ 1 - 1
main/filesystem-crypto/src/main/java/org/cryptomator/crypto/engine/impl/ThreadLocalAesCtrCipher.java

@@ -25,7 +25,7 @@ final class ThreadLocalAesCtrCipher {
 		try {
 			return Cipher.getInstance(AES_CTR);
 		} catch (NoSuchAlgorithmException | NoSuchPaddingException e) {
-			throw new IllegalStateException("Could not create MAC.", e);
+			throw new IllegalStateException("Could not create Cipher.", e);
 		}
 	}