Package org.bouncycastle.crypto.tls
Class TlsAEADCipher
- java.lang.Object
-
- org.bouncycastle.crypto.tls.TlsAEADCipher
-
-
Field Summary
Fields Modifier and Type Field Description protected TlsContext
context
protected AEADBlockCipher
decryptCipher
protected byte[]
decryptImplicitNonce
protected AEADBlockCipher
encryptCipher
protected byte[]
encryptImplicitNonce
protected int
macSize
static int
NONCE_RFC5288
protected int
nonceMode
protected int
record_iv_length
-
Constructor Summary
Constructors Constructor Description TlsAEADCipher(TlsContext context, AEADBlockCipher clientWriteCipher, AEADBlockCipher serverWriteCipher, int cipherKeySize, int macSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]
decodeCiphertext(long seqNo, short type, byte[] ciphertext, int offset, int len)
byte[]
encodePlaintext(long seqNo, short type, byte[] plaintext, int offset, int len)
protected byte[]
getAdditionalData(long seqNo, short type, int len)
int
getPlaintextLimit(int ciphertextLimit)
-
-
-
Field Detail
-
NONCE_RFC5288
public static final int NONCE_RFC5288
- See Also:
- Constant Field Values
-
context
protected TlsContext context
-
macSize
protected int macSize
-
record_iv_length
protected int record_iv_length
-
encryptCipher
protected AEADBlockCipher encryptCipher
-
decryptCipher
protected AEADBlockCipher decryptCipher
-
encryptImplicitNonce
protected byte[] encryptImplicitNonce
-
decryptImplicitNonce
protected byte[] decryptImplicitNonce
-
nonceMode
protected int nonceMode
-
-
Constructor Detail
-
TlsAEADCipher
public TlsAEADCipher(TlsContext context, AEADBlockCipher clientWriteCipher, AEADBlockCipher serverWriteCipher, int cipherKeySize, int macSize) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
getPlaintextLimit
public int getPlaintextLimit(int ciphertextLimit)
- Specified by:
getPlaintextLimit
in interfaceTlsCipher
-
encodePlaintext
public byte[] encodePlaintext(long seqNo, short type, byte[] plaintext, int offset, int len) throws java.io.IOException
- Specified by:
encodePlaintext
in interfaceTlsCipher
- Throws:
java.io.IOException
-
decodeCiphertext
public byte[] decodeCiphertext(long seqNo, short type, byte[] ciphertext, int offset, int len) throws java.io.IOException
- Specified by:
decodeCiphertext
in interfaceTlsCipher
- Throws:
java.io.IOException
-
getAdditionalData
protected byte[] getAdditionalData(long seqNo, short type, int len) throws java.io.IOException
- Throws:
java.io.IOException
-
-