CookieSigner.fromStringKey constructor

CookieSigner.fromStringKey(
  1. String key, {
  2. Hash? hash,
})

Creates an hmac from a string key and a hash (defaults to sha256).

Implementation

factory CookieSigner.fromStringKey(String key, {Hash? hash}) {
  return CookieSigner(utf8.encode(key), hash: hash);
}