Build a new HMACSHA1 Key for our CSRF Middleware from key bytes.
Build a new HMACSHA1 Key for our CSRF Middleware
from key bytes. This operation is unsafe, in that
any amount less than 20 bytes will throw an exception when loaded
into Mac
. Any keys larger than 64 bytes are just hashed.
For more information, refer to: https://tools.ietf.org/html/rfc2104#section-3
Use for loading a key from a config file, after having generated one safely
Check origin matches our proposed origin.
Generate a signing Key for the CSRF token *
A Constant-time string equality *
A Constant-time string equality *