AuthenticatedCipher interface isn't needed outside crypto package.

This commit is contained in:
akwizgran
2015-01-09 13:06:44 +00:00
parent dc5e37a96d
commit 5d46d3a4b4
10 changed files with 20 additions and 45 deletions

View File

@@ -1,22 +0,0 @@
package org.briarproject.api.crypto;
import java.security.GeneralSecurityException;
public interface AuthenticatedCipher {
/**
* Initializes this cipher with a key and an initialisation vector (IV).
*/
void init(boolean encrypt, SecretKey key, byte[] iv)
throws GeneralSecurityException;
/** Encrypts or decrypts data in a single-part operation. */
int process(byte[] input, int inputOff, int len, byte[] output,
int outputOff) throws GeneralSecurityException;
/** Returns the length of the message authentication code (MAC) in bytes. */
int getMacBytes();
/** Returns the block size of the cipher in bytes. */
int getBlockBytes();
}

View File

@@ -77,9 +77,6 @@ public interface CryptoComponent {
*/
SecretKey deriveFrameKey(byte[] secret, long streamNumber, boolean alice);
/** Returns a cipher for encrypting and authenticating frames. */
AuthenticatedCipher getFrameCipher();
/** Encodes the pseudo-random tag that is used to recognise a stream. */
void encodeTag(byte[] tag, SecretKey tagKey, long streamNumber);