gnu.crypto.pad
public class TLS1 extends BasePad
block-ciphered struct {
opaque content[TLSCompressed.length];
opaque MAC[CipherSpec.hash_size];
uint8 padding[GenericBlockCipher.padding_length];
uint8 padding_length;
} GenericBlockCipher;
Where padding_length is any multiple of cipher_block_size - ((SSLCompressed.length + CipherSpec.hash_size) % cipher_block_size) - 1 that is less than 255. Every byte of the padding must be equal to padding_length. That is, the end of the plaintext is n + 1 copies of the unsigned byte n.
| Constructor Summary | |
|---|---|
| TLS1() | |
| Method Summary | |
|---|---|
| byte[] | pad(byte[] in, int off, int len) |
| void | setup() |
| int | unpad(byte[] in, int off, int len) |