public final class Sp80038aPaddingMechanism extends PaddingMechanism
This padding mechanism is based on the padding scheme defined in NIST's Special Publication 800-38A.
In the SP 800-38A padding scheme, the final block of plaintext is padded out
to a multiple of the symmetric cipher block mode block size in the following
manner. (For feedback block modes, the block mode block size (segment size)
can be less than the symmetric cipher block size.) To the end of the final
block of plaintext is appended a single '1' byte followed by as few '0' bytes
(possibly none) as are necessary to complete the final block (segment). In
hexadecimal, the possible padding values are: 01, 0100,
..., 0100000000000000, 010000000000000000, ..., 010000...000000.
As with all of Entrust's symmetric block cipher padding mechanisms, since all plaintext is always padded with a set of known padding bytes, the padding can always be removed unambiguously after decryption. Following decryption, if padding was used, the result must be padded and the padding value will be removed.