random_cookie_key function

Random cookie key generator

Random cookie key generator

Uses a cryptographically secure pseudorandom number generator from sodium::helpers() to generate a 64 digit hexadecimal string. 'sodium' wraps around 'libsodium'.

random_cookie_key()

Returns

A 64 digit hexadecimal string to be used as a key for cookie encryption.

Details

Please see session_cookie for more information on how to save the generated key.

See Also

session_cookie

  • Maintainer: Barret Schloerke
  • License: MIT + file LICENSE
  • Last published: 2025-02-19