| Modifier and Type | Field and Description |
|---|---|
protected TlsCryptoParameters |
cryptoParameters |
protected org.spongycastle.tls.crypto.impl.TlsSuiteHMac |
readMac |
protected org.spongycastle.tls.crypto.impl.TlsSuiteHMac |
writeMac |
| Constructor and Description |
|---|
TlsNullCipher(TlsCryptoParameters cryptoParameters,
TlsHMAC clientMac,
TlsHMAC serverMac) |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
decodeCiphertext(long seqNo,
short type,
byte[] ciphertext,
int offset,
int len)
Validate and decrypt the passed in cipher text using the current cipher suite.
|
byte[] |
encodePlaintext(long seqNo,
short type,
byte[] plaintext,
int offset,
int len)
Encrypt and MAC the passed in plain text using the current cipher suite.
|
int |
getPlaintextLimit(int ciphertextLimit)
Return the maximum size for the plaintext given ciphertextlimit bytes of ciphertext.
|
protected final TlsCryptoParameters cryptoParameters
protected final org.spongycastle.tls.crypto.impl.TlsSuiteHMac readMac
protected final org.spongycastle.tls.crypto.impl.TlsSuiteHMac writeMac
public TlsNullCipher(TlsCryptoParameters cryptoParameters, TlsHMAC clientMac, TlsHMAC serverMac) throws java.io.IOException
java.io.IOExceptionpublic int getPlaintextLimit(int ciphertextLimit)
TlsCiphergetPlaintextLimit in interface TlsCipherciphertextLimit - the maximum number of bytes of ciphertext.public byte[] encodePlaintext(long seqNo,
short type,
byte[] plaintext,
int offset,
int len)
throws java.io.IOException
TlsCipherencodePlaintext in interface TlsCipherseqNo - sequence number of the message represented by plaintext.type - content type of the message represented by plaintext.plaintext - array holding input plain text to the cipher.offset - offset into input array the plain text starts at.len - length of the plaintext in the array.java.io.IOExceptionpublic byte[] decodeCiphertext(long seqNo,
short type,
byte[] ciphertext,
int offset,
int len)
throws java.io.IOException
TlsCipherdecodeCiphertext in interface TlsCipherseqNo - sequence number of the message represented by ciphertext.type - content type of the message represented by ciphertext.ciphertext - array holding input cipher text to the cipher.offset - offset into input array the cipher text starts at.len - length of the cipher text in the array.java.io.IOException