Modifier and Type | Field and Description |
---|---|
protected TlsClientContext |
context |
protected BlockCipher |
decryptCipher |
protected BlockCipher |
encryptCipher |
protected TlsMac |
readMac |
protected TlsMac |
writeMac |
Constructor and Description |
---|
TlsBlockCipher(TlsClientContext context,
BlockCipher encryptCipher,
BlockCipher decryptCipher,
Digest writeDigest,
Digest readDigest,
int cipherKeySize) |
Modifier and Type | Method and Description |
---|---|
byte[] |
decodeCiphertext(short type,
byte[] ciphertext,
int offset,
int len) |
byte[] |
encodePlaintext(short type,
byte[] plaintext,
int offset,
int len) |
protected int |
chooseExtraPadBlocks(SecureRandom r,
int max) |
protected void |
initCipher(boolean forEncryption,
BlockCipher cipher,
byte[] key_block,
int key_size,
int key_offset,
int iv_offset) |
protected int |
lowestBitSet(int x) |
protected TlsClientContext context
protected BlockCipher encryptCipher
protected BlockCipher decryptCipher
protected TlsMac writeMac
protected TlsMac readMac
public TlsBlockCipher(TlsClientContext context, BlockCipher encryptCipher, BlockCipher decryptCipher, Digest writeDigest, Digest readDigest, int cipherKeySize)
protected void initCipher(boolean forEncryption, BlockCipher cipher, byte[] key_block, int key_size, int key_offset, int iv_offset)
public byte[] encodePlaintext(short type, byte[] plaintext, int offset, int len)
encodePlaintext
in interface TlsCipher
public byte[] decodeCiphertext(short type, byte[] ciphertext, int offset, int len) throws IOException
decodeCiphertext
in interface TlsCipher
IOException
protected int chooseExtraPadBlocks(SecureRandom r, int max)
protected int lowestBitSet(int x)
Copyright © 2015. All rights reserved.