Safe Haskell | None |
---|---|
Language | Haskell2010 |
A few functions to deal with the image itself
- bsToImg :: ByteString -> IO (Image Word8)
- objToImg :: ToJSON a => a -> IO (Image Word8)
- bsToImgSec :: ByteString -> FilePath -> IO (Image Word8)
- objToImgSec :: ToJSON a => a -> FilePath -> IO (Image Word8)
- bsToImgSec' :: ByteString -> (PublicKey, PrivateKey) -> IO (Image Word8)
- objToImgSec' :: ToJSON a => a -> (PublicKey, PrivateKey) -> IO (Image Word8)
Functions to convert to JuicyPixels Image
Functions to sign and convert to Image
bsToImgSec :: ByteString -> FilePath -> IO (Image Word8) Source #
Creates a signed QR code from a strict bytestring and path to keyfile/path where the keyfile should be generated, yielding a JuicyPixels Image
.
Note that QR codes may only contain a small number of characters, so encrypting can sometimes make an object too big to encode.
bsToImgSec (BS.pack "hello") ".key.hk"
objToImgSec :: ToJSON a => a -> FilePath -> IO (Image Word8) Source #
Encode an object as a JuicyPixels Image
with a key in a given file.
Functions to sign with user-supplied key and yield an Image
bsToImgSec' :: ByteString -> (PublicKey, PrivateKey) -> IO (Image Word8) Source #
Sign a byteString with a given key
bsToImgSec' (BS.pack "str") (generate 256 0x10001)
objToImgSec' :: ToJSON a => a -> (PublicKey, PrivateKey) -> IO (Image Word8) Source #
Encode an object as a JuicyPixels Image
with a key.