gnu.crypto.pad

Class TBC

public final class TBC extends BasePad

The implementation of the Trailing Bit Complement (TBC) padding algorithm.

In this mode, "...the data string is padded at the trailing end with the complement of the trailing bit of the unpadded message: if the trailing bit is 1, then 0 bits are appended, and if the trailing bit is 0, then 1 bits are appended. As few bits are added as are necessary to meet the formatting size requirement."

References:
Recommendation for Block Cipher Modes of Operation Methods and Techniques, Morris Dworkin.

Version: $Revision: 1.5 $

Constructor Summary
TBC()
Trivial package-private constructor for use by the Factory class.

Method Summary
byte[]pad(byte[] in, int offset, int length)
voidsetup()
intunpad(byte[] in, int offset, int length)

Constructor Detail

TBC

TBC()
Trivial package-private constructor for use by the Factory class.

See Also: PadFactory

Method Detail

pad

public byte[] pad(byte[] in, int offset, int length)

setup

public void setup()

unpad

public int unpad(byte[] in, int offset, int length)
Copyright © 2001, 2002, 2003 Free Software Foundation, Inc. All Rights Reserved.