cryptal
latest
Cryptography Abstraction Layer
|
Public Member Functions | |
getPaddingData ($blockSize, $expectedSize) | |
getPaddingSize ($paddedData, $blockSize) | |
Pads a string using NUL bytes, eventually creating a new block if the plaintext's length is already a multiple of the block size.
Definition at line 11 of file NonEmptyZero.php.
fpoirotte\Cryptal\Padding\NonEmptyZero::getPaddingData | ( | $blockSize, | |
$expectedSize | |||
) |
Return padding data to form a complete block.
int | $blockSize | The cipher's block size, in bytes. |
int | $expectedSize | The padding's expected size (in bytes) to form a (possibly new) complete block. This value is always such that: |
string | Padding data. |
Implements fpoirotte\Cryptal\PaddingInterface.
Definition at line 13 of file NonEmptyZero.php.
fpoirotte\Cryptal\Padding\NonEmptyZero::getPaddingSize | ( | $paddedData, | |
$blockSize | |||
) |
Return the size (in bytes) of the padding in some already-padded data.
string | $paddedData | The padded data to analyze. |
int | $blockSize | The cipher's block size, in bytes. |
Exception | An exception is thrown when the supplied data is invalid (was not padded using the currently-selected scheme). |
Implements fpoirotte\Cryptal\PaddingInterface.
Definition at line 18 of file NonEmptyZero.php.