Package org.bouncycastle.crypto.tls
Class TlsAEADCipher
- java.lang.Object
-
- org.bouncycastle.crypto.tls.TlsAEADCipher
-
-
Field Summary
Fields Modifier and Type Field Description protected TlsContextcontextprotected AEADBlockCipherdecryptCipherprotected byte[]decryptImplicitNonceprotected AEADBlockCipherencryptCipherprotected byte[]encryptImplicitNonceprotected intmacSizestatic intNONCE_RFC5288protected intnonceModeprotected intrecord_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)intgetPlaintextLimit(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:
getPlaintextLimitin interfaceTlsCipher
-
encodePlaintext
public byte[] encodePlaintext(long seqNo, short type, byte[] plaintext, int offset, int len) throws java.io.IOException- Specified by:
encodePlaintextin 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:
decodeCiphertextin interfaceTlsCipher- Throws:
java.io.IOException
-
getAdditionalData
protected byte[] getAdditionalData(long seqNo, short type, int len) throws java.io.IOException- Throws:
java.io.IOException
-
-