Safe Haskell | None |
---|
The KeyStore and Associated Types
Note that most of these types and functions were generated by the api-tools (Data.Api.Tools) from the schema in Data.KeyStore.Types.Schema, marked down in https://github.com/cdornan/keystore/blob/master/schema.md.
- data KeyStore = KeyStore {
- _ks_config :: !Configuration
- _ks_keymap :: !KeyMap
- ks_keymap :: Lens' KeyStore KeyMap
- ks_config :: Lens' KeyStore Configuration
- data Configuration = Configuration {}
- type TriggerMap = Map TriggerID Trigger
- data Trigger = Trigger {
- _trg_id :: !TriggerID
- _trg_pattern :: !Pattern
- _trg_settings :: !Settings
- newtype Settings = Settings {}
- cfg_settings :: Lens' Configuration Settings
- cfg_triggers :: Lens' Configuration TriggerMap
- data TextJsonAssoc = TextJsonAssoc {}
- type KeyMap = Map Name Key
- data NameKeyAssoc = NameKeyAssoc {}
- data Key = Key {
- _key_name :: !Name
- _key_comment :: !Comment
- _key_identity :: !Identity
- _key_is_binary :: !Bool
- _key_env_var :: !(Maybe EnvVar)
- _key_hash :: !(Maybe Hash)
- _key_public :: !(Maybe PublicKey)
- _key_secret_copies :: !EncrypedCopyMap
- _key_clear_text :: !(Maybe ClearText)
- _key_clear_private :: !(Maybe PrivateKey)
- _key_created_at :: !UTCTime
- key_name :: Lens' Key Name
- key_comment :: Lens' Key Comment
- key_identity :: Lens' Key Identity
- key_is_binary :: Lens' Key Bool
- key_env_var :: Lens' Key (Maybe EnvVar)
- key_hash :: Lens' Key (Maybe Hash)
- key_public :: Lens' Key (Maybe PublicKey)
- key_secret_copies :: Lens' Key EncrypedCopyMap
- key_clear_text :: Lens' Key (Maybe ClearText)
- key_clear_private :: Lens' Key (Maybe PrivateKey)
- key_created_at :: Lens' Key UTCTime
- data Hash = Hash {}
- data HashDescription = HashDescription {}
- type EncrypedCopyMap = Map Safeguard EncrypedCopy
- data EncrypedCopy = EncrypedCopy {
- _ec_safeguard :: !Safeguard
- _ec_cipher :: !Cipher
- _ec_prf :: !HashPRF
- _ec_iterations :: !Iterations
- _ec_salt :: !Salt
- _ec_secret_data :: !EncrypedCopyData
- data EncrypedCopyData
- = ECD_rsa !RSASecretData
- | ECD_aes !AESSecretData
- | ECD_clear !ClearText
- | ECD_no_data !Void
- data RSASecretData = RSASecretData {}
- data AESSecretData = AESSecretData {
- _asd_iv :: !IV
- _asd_secret_data :: !SecretData
- data PublicKey = PublicKey {}
- data PrivateKey = PrivateKey {}
- data Cipher
- = CPH_aes128
- | CPH_aes192
- | CPH_aes256
- _text_Cipher :: Cipher -> Text
- data HashPRF
- = PRF_sha1
- | PRF_sha256
- | PRF_sha512
- _text_HashPRF :: HashPRF -> Text
- data EncryptionKey
- = EK_public !PublicKey
- | EK_private !PrivateKey
- | EK_symmetric !AESKey
- | EK_none !Void
- newtype FragmentID = FragmentID {
- _FragmentID :: Text
- data Pattern = Pattern {
- _pat_string :: String
- _pat_regex :: Regex
- newtype Iterations = Iterations {
- _Iterations :: Int
- newtype Octets = Octets {}
- newtype Identity = Identity {}
- newtype SettingID = SettingID {
- _SettingID :: Text
- newtype TriggerID = TriggerID {
- _TriggerID :: Text
- newtype Comment = Comment {}
- newtype EnvVar = EnvVar {}
- newtype ClearText = ClearText {
- _ClearText :: Binary
- newtype Salt = Salt {}
- newtype IV = IV {}
- newtype HashData = HashData {}
- newtype AESKey = AESKey {}
- newtype SecretData = SecretData {}
- newtype RSAEncryptedKey = RSAEncryptedKey {}
- newtype RSASecretBytes = RSASecretBytes {}
- newtype RSASignature = RSASignature {}
- newtype EncryptionPacket = EncryptionPacket {}
- newtype SignaturePacket = SignaturePacket {}
- newtype Void = Void {}
- data Dirctn
- = Encrypting
- | Decrypting
- void_ :: Void
- pattern :: String -> Pattern
- defaultSettings :: Settings
- checkSettingsCollisions :: Settings -> [SettingID]
- emptyKeyStore :: Configuration -> KeyStore
- emptyKeyMap :: KeyMap
- defaultConfiguration :: Settings -> Configuration
- pbkdf :: HashPRF -> ClearText -> Salt -> Iterations -> Octets -> (ByteString -> a) -> a
- keyWidth :: Cipher -> Octets
- module Data.KeyStore.Types.NameAndSafeguard
- module Data.KeyStore.Types.E
Documentation
KeyStore | |
|
data Configuration Source
type TriggerMap = Map TriggerID TriggerSource
Trigger | |
|
Key | |
|
data HashDescription Source
HashDescription | |
|
data EncrypedCopy Source
EncrypedCopy | |
|
data EncrypedCopyData Source
data RSASecretData Source
data AESSecretData Source
AESSecretData | |
|
data PrivateKey
Represent a RSA private key.
Only the pub, d fields are mandatory to fill.
p, q, dP, dQ, qinv are by-product during RSA generation, but are useful to record here to speed up massively the decrypt and sign operation.
implementations can leave optional fields to 0.
PrivateKey | |
|
_text_Cipher :: Cipher -> TextSource
_text_HashPRF :: HashPRF -> TextSource
data EncryptionKey Source
newtype FragmentID Source
Keystore session context, created at the start of a session and passed to the keystore access functions.
Pattern | |
|
newtype Iterations Source
newtype SecretData Source
newtype RSAEncryptedKey Source
newtype RSASecretBytes Source
newtype RSASignature Source
newtype EncryptionPacket Source
newtype SignaturePacket Source
pbkdf :: HashPRF -> ClearText -> Salt -> Iterations -> Octets -> (ByteString -> a) -> aSource
module Data.KeyStore.Types.E