Class: PKCS7

PKCS7

Implements PKCS7 Padding functionality. The byte value we pad with is the number total number of bytes being padded onto the data. If the data length is already a "clean" multiple of the block length, it is still padded out to another block, so we can safely undo the padding afterwards.

new PKCS7(data)

Creates a new PKCS7 padding mode instance
Parameters:
Name Type Description
data Object Initialization options for the class, passed automatically into PKCS7#initialize
Source:

Extends

Methods

initialize(data) → {PaddingMode}

Invoked during subclass instantiation. All properties needed to initialize the class must be passed in.
Parameters:
Name Type Description
data Object A list of properties used to initialize the class.
Properties
Name Type Description
cipher BlockCipher A reference to a BlockCipher subclass instance. Used to get information about the block size.
Inherited From:
Source:
Returns:
Type
PaddingMode