Safe Haskell | None |
---|---|
Language | Haskell2010 |
Module providing several functions for creating QR codes and their signed counterparts
- createQRCode :: ToJSON a => a -> FilePath -> IO ()
- createSecureQRCode :: ToJSON a => a -> FilePath -> FilePath -> IO ()
- createSecureQRCode' :: ToJSON a => a -> (PublicKey, PrivateKey) -> FilePath -> IO ()
- byteStringToQR :: ByteString -> FilePath -> IO ()
- readQRString :: FilePath -> IO String
- readQRStrSec :: FromJSON a => FilePath -> FilePath -> IO a
- readQRStrSec' :: FromJSON a => FilePath -> (PublicKey, PrivateKey) -> IO a
Functions on objects
createQRCode :: ToJSON a => a -> FilePath -> IO () Source #
Creates a QR code from an object that is part of the ToJSON class
createQRCode userRecord "user-231.png"
createSecureQRCode :: ToJSON a => a -> FilePath -> FilePath -> IO () Source #
Creates a signed QR code from an object that is part of the ToJSON class
createSecureQRCode' :: ToJSON a => a -> (PublicKey, PrivateKey) -> FilePath -> IO () Source #
Creates a signed QR code from an object that is part of the ToJSON class
Functions for ByteStrings
byteStringToQR :: ByteString -> FilePath -> IO () Source #
Creates a QR code from a strict bytestring
functions to read QR codes
readQRString :: FilePath -> IO String Source #
given a filepath, read the QR code as a string in all lowercase
readQRString "picture.jpg"
readQRStrSec :: FromJSON a => FilePath -> FilePath -> IO a Source #
given a filepath pointing to a QR code, get the contents & verify signature with the keyfile
readQRStrSec "output.png" ".key.hk"
readQRStrSec' :: FromJSON a => FilePath -> (PublicKey, PrivateKey) -> IO a Source #
Read an image containing a QR code, decode and verify the signature using the given key.