MODE_INTERNAL
MODE_INTERNAL
Toggles the internal implementation
Pure-PHP implementations of keyed-hash message authentication codes (HMACs) and various cryptographic hashing functions.
__construct(string $hash = 'sha1') : \phpseclib\Crypt\Hash
Default Constructor.
string | $hash |
_computeKey()
Pre-compute the key used by the HMAC
Quoting http://tools.ietf.org/html/rfc2104#section-2, "Applications that use keys longer than B bytes will first hash the key using H and then use the resultant L byte string as the actual key to HMAC."
As documented in https://www.reddit.com/r/PHP/comments/9nct2l/symfonypolyfill_hash_pbkdf2_correct_fix_for/ when doing an HMAC multiple times it's faster to compute the hash once instead of computing it during every call
_md2(string $m)
Pure-PHP implementation of MD2
See RFC1319.
string | $m |
_sha256(string $m)
Pure-PHP implementation of SHA256
See SHA-256 (a SHA-2 variant) pseudocode - Wikipedia.
string | $m |