Signer
class Signer
Signs and validates strings using MACs (message authentication codes).
Constants
MAC_LENGTH |
MAC length. |
Properties
protected string | $secret | Secret used to sign and validate strings. |
Methods
__construct(string $secret)
Constructor.
string
getSignature(string $string)
Returns the signature.
string
sign(string $string)
Returns a signed string.
false|string
validate(string $string)
Returns the original string if the signature is valid or FALSE if not.
Details
at line 38
__construct(string $secret)
Constructor.
at line 49
protected string
getSignature(string $string)
Returns the signature.
at line 60
string
sign(string $string)
Returns a signed string.
at line 71
false|string
validate(string $string)
Returns the original string if the signature is valid or FALSE if not.