cryptal
latest
Cryptography Abstraction Layer
|
Public Member Functions | |
__construct (MacEnum $macAlgorithm, SubAlgorithmAbstractEnum $innerAlgorithm, $key, $nonce= '') | |
Public Member Functions inherited from fpoirotte\Cryptal\AbstractContextBasedAlgorithm | |
__toString () | |
finalize ($raw=false) | |
update ($data) | |
Public Member Functions inherited from fpoirotte\Cryptal\ContextBasedInterface | |
__toString () | |
finalize ($raw=false) | |
update ($data) | |
Protected Member Functions | |
internalFinalize () | |
internalUpdate ($data) | |
Protected Member Functions inherited from fpoirotte\Cryptal\AbstractContextBasedAlgorithm | |
internalFinalize () | |
internalUpdate ($data) | |
Private Attributes | |
$r | |
First half of secret key (second half in the specs due to endianness). | |
$s | |
Second half of secret key. | |
Additional Inherited Members | |
Static Public Member Functions inherited from fpoirotte\Cryptal\Implementers\AbstractMac | |
static | mac (MacEnum $macAlgorithm, SubAlgorithmAbstractEnum $innerAlgorithm, $key, $data, $nonce= '', $raw=false) |
Poly1305 Message Authenticator.
Definition at line 17 of file Poly1305.php.
fpoirotte\Cryptal\DefaultAlgorithms\Poly1305::__construct | ( | MacEnum | $macAlgorithm, |
SubAlgorithmAbstractEnum | $innerAlgorithm, | ||
$key, | |||
$nonce = '' |
|||
) |
Construct a new context to generate a Message Authentication Code.
MacEnum | $macAlgorithm | Algorithm to use to produce the message authentication code. |
SubAlgorithmAbstractEnum | $innerAlgorithm | Inner algorithm used during generation. This should be either an instance of CipherEnum or MacEnum, depending on the value for the $macAlgorithm parameter. |
string | $key | Secret key used to produce the Message Authentication Code. |
string | $nonce | (optional) Nonce used to randomize the output. |
Implements fpoirotte\Cryptal\Implementers\MacInterface.
Definition at line 25 of file Poly1305.php.
References fpoirotte\Cryptal\DefaultAlgorithms\Poly1305\$r, and fpoirotte\Cryptal\DefaultAlgorithms\Poly1305\$s.