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
, and any value above will be truncated (not good for entropy).
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 *