Safe Haskell | None |
---|---|
Language | Haskell2010 |
- newtype Cipher = Cipher {
- runCipher :: Args -> PlainContent -> EitherT Text IO EncContent
- newtype Decipher = Decipher {
- runDecipher :: Args -> EncContent -> EitherT Text IO PlainContent
- newtype Algs = Algs {}
- algorithm :: AlgName -> Cipher -> Decipher -> Algs
- encryptTem :: Algs -> Metadata -> Tem -> EitherT EError IO (Tem, Metadata)
- decryptTem :: Algs -> Metadata -> Tem -> EitherT EError IO Tem
- data EError
Basic encryption primitives
Cipher routine.
Cipher | |
|
Decipher routine.
Decipher | |
|
Container of multiple encryption algorithms
Operations on Tem
encryptTem :: Algs -> Metadata -> Tem -> EitherT EError IO (Tem, Metadata) Source #
Encrypt template with algorithms container and metadata.
Note: ciphered values will be left intact.
decryptTem :: Algs -> Metadata -> Tem -> EitherT EError IO Tem Source #
Decrypt template with algorithms container and metadata.
Note: if plain value occurred, DecryptingPlain
will be returned.
Exceptions
Exception during encrypting/decrypting the Tem
.
AlgNotFound AlgName |
|
ValNotFound ValName |
|
DecryptingPlain ValName |
|
MetadataError MetadataError |
|
CipherError AlgName Text | Error during ciphering using |
DecipherError AlgName Text | Error during deciphering using |