cryptal
latest
Cryptography Abstraction Layer
|
Public Member Functions | |
getPaddingData ($blockSize, $expectedSize) | |
getPaddingSize ($paddedData, $blockSize) | |
Static Protected Member Functions | |
static | getRandomBytes () |
Pads a string using the scheme defined in ISO 10126.
Definition at line 15 of file Iso10126.php.
fpoirotte\Cryptal\Padding\Iso10126::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 31 of file Iso10126.php.
fpoirotte\Cryptal\Padding\Iso10126::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 40 of file Iso10126.php.
|
staticprotected |
Generate a bunch of pseudo-random bytes.
string | A string consisting of pseudo-randomly generated bytes. |
Definition at line 23 of file Iso10126.php.