qr-imager-2.0.0.2: Library to generate images.

Safe HaskellNone
LanguageHaskell2010

Data.QRCodes.Signature

Description

Functions associated with signing the JSON records

Synopsis

Documentation

checkSigFile :: ByteString -> FilePath -> IO (Either JwtError ByteString) Source #

Verify a signed token with a key

checkSig :: ByteString -> (PublicKey, PrivateKey) -> IO (Either JwtError ByteString) Source #

Verify a signed token with a key from a given filepath

mkSigFile :: ByteString -> FilePath -> IO ByteString Source #

Sign a token. If the key file does not exist, a new key will be generated.

mkSig :: ByteString -> (PublicKey, PrivateKey) -> IO ByteString Source #

Sign a token with a key. (note that we must pass in a processed token since there is no uppercase/lowercase for QR codes)

mkSig (BS.pack "hello") (generate 256 0x10001)