| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
E.Template
Contents
Description
A text file with sensitive data.
Tem could contain plain text, plain values PlainValue that would be encrypted, and references to already encrypted values ValRef.
PlainValue syntax
{{P|<variable name>|<encryption algorithm name>|<arguments>|<content>}}E.g. {{P|username|gpgme|keyId = foobar|dmalikov}}.
ValRef syntax
{{E|<variable name>}}E.g. {{E|username}}.
<variable name>. Name of the variable stored inMetadatawhich could be referenced inValRef.<encryption algorithm name>.AlgNameprovided by one of the algorithmsAlgsused for encryption/decryption.<arguments>. Arguments that encryption algorithmAlgsuse during encryption/decryption.<content>. Sensitive data to encrypt.
- data Tem
- txt :: Text -> Tem
- val :: PlainValue -> Tem
- ref :: ValRef -> Tem
- data PlainValue = PlainValue !ValName !AlgName !Args !PlainContent
- data PlainContent = PlainContent {
- unPlainContent :: !Text
- data EncValue = EncValue !AlgName !Args !EncContent
- data EncContent = EncContent {
- unEncContent :: !Text
- newtype ValName = ValName {}
- data ValRef = ValRef {}
- data Args = Args {}
- data ArgName = ArgName {}
- data ArgValue = ArgValue {
- unArgValue :: !Text
- newtype AlgName = AlgName {}
- arg :: ArgName -> ArgValue -> Args
- lookupArg :: Text -> Args -> Maybe ArgValue
- normalize :: Tem -> Tem
- parseMaybe :: Parser a -> Text -> Maybe a
- parseArgNV :: Parser (ArgName, ArgValue)
- parseArgs :: Parser Args
- parsePlainValue :: Parser PlainValue
- parseValRef :: Parser ValRef
- parseTem :: Parser Tem
- class Serialize a where
Template
Representation of encrypted and/or to-be-encrypted content.
val :: PlainValue -> Tem Source #
Convert PlainValue to Tem.
Value
data PlainValue Source #
Representation of plain value.
Constructors
| PlainValue !ValName !AlgName !Args !PlainContent |
Instances
data PlainContent Source #
Plain text.
Constructors
| PlainContent | |
Fields
| |
Instances
Representation of encrypted value (in Metadata).
Constructors
| EncValue !AlgName !Args !EncContent |
Value name.
Reference to an encrypted value.
Encryption/decryption arguments
Bunch of arguments that could be useful for encryption/decryption.
Typed key of Args hashmap.
Typed value of Args hashmap.
Constructors
| ArgValue | |
Fields
| |
Encryption/decryption algorithm name. E.g. gpg.