Safe Haskell | None |
---|---|
Language | Haskell2010 |
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 inMetadata
which could be referenced inValRef
.<encryption algorithm name>
.AlgName
provided by one of the algorithmsAlgs
used for encryption/decryption.<arguments>
. Arguments that encryption algorithmAlgs
use 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.
data PlainContent Source #
Plain text.
Representation of encrypted value (in Metadata
).
data EncContent Source #
Ciphered text.
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.
ArgValue | |
|
Encryption/decryption algorithm name. E.g. gpg
.