module Handler.Utils.Users
  ( computeUserAuthenticationDigest
  , Digest, SHA3_256
  , constEq
  ) where

import Import

import Crypto.Hash (Digest, SHA3_256, hashlazy)

import Data.ByteArray (constEq)

import qualified Data.Aeson as JSON


computeUserAuthenticationDigest :: AuthenticationMode -> Digest SHA3_256
computeUserAuthenticationDigest = hashlazy . JSON.encode
