Remove AAD from AuthenticatedCipher interface.

This commit is contained in:
akwizgran
2015-01-09 13:01:02 +00:00
parent 4e57029d98
commit dc5e37a96d
6 changed files with 39 additions and 46 deletions

View File

@@ -2,14 +2,12 @@ package org.briarproject.api.crypto;
import java.security.GeneralSecurityException;
/** An authenticated cipher that supports additional authenticated data. */
public interface AuthenticatedCipher {
/**
* Initializes this cipher with a key, an initialisation vector (IV) and
* additional authenticated data (AAD).
* Initializes this cipher with a key and an initialisation vector (IV).
*/
void init(boolean encrypt, SecretKey key, byte[] iv, byte[] aad)
void init(boolean encrypt, SecretKey key, byte[] iv)
throws GeneralSecurityException;
/** Encrypts or decrypts data in a single-part operation. */
@@ -17,8 +15,8 @@ public interface AuthenticatedCipher {
int outputOff) throws GeneralSecurityException;
/** Returns the length of the message authentication code (MAC) in bytes. */
int getMacLength();
int getMacBytes();
/** Returns the block size of the cipher in bytes. */
int getBlockSize();
int getBlockBytes();
}