|
cryptal
latest
Cryptography Abstraction Layer
|
Inheritance diagram for fpoirotte\Cryptal\PaddingInterface:Public Member Functions | |
| getPaddingData ($blockSize, $expectedSize) | |
| getPaddingSize ($paddedData, $blockSize) | |
Interface for a padding scheme.
Definition at line 8 of file PaddingInterface.php.
| fpoirotte\Cryptal\PaddingInterface::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. |
Implemented in fpoirotte\Cryptal\Padding\Iso10126, fpoirotte\Cryptal\Padding\None, fpoirotte\Cryptal\Padding\NonEmptyZero, fpoirotte\Cryptal\Padding\AnsiX923, fpoirotte\Cryptal\Padding\IsoIec7816, fpoirotte\Cryptal\Padding\Pkcs7, and fpoirotte\Cryptal\Padding\Zero.
| fpoirotte\Cryptal\PaddingInterface::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). |
Implemented in fpoirotte\Cryptal\Padding\Iso10126, fpoirotte\Cryptal\Padding\None, fpoirotte\Cryptal\Padding\NonEmptyZero, fpoirotte\Cryptal\Padding\AnsiX923, fpoirotte\Cryptal\Padding\IsoIec7816, fpoirotte\Cryptal\Padding\Pkcs7, and fpoirotte\Cryptal\Padding\Zero.