| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Crypto.Age.Recipient
Contents
Description
age file recipients.
Synopsis
- data Recipients
- data ScryptRecipient = ScryptRecipient {
- srPassphrase :: !Passphrase
- srSalt :: !Salt
- srWorkFactor :: !WorkFactor
- newtype X25519Recipient = X25519Recipient {}
- bytesToX25519Recipient :: ByteString -> Maybe X25519Recipient
- x25519RecipientToBytes :: X25519Recipient -> ByteString
- encodeX25519Recipient :: X25519Recipient -> Either EncodingError Text
- data DecodeX25519RecipientError
- decodeX25519Recipient :: Text -> Either DecodeX25519RecipientError X25519Recipient
Recipients
data Recipients Source #
Collection of age file recipients.
Constructors
| RecipientsScrypt !ScryptRecipient |
As noted in the
age specification,
no other stanzas can be specified in the header when there is an
As a result, only one |
| RecipientsX25519 !(NonEmpty X25519Recipient) | X25519 recipients. |
Instances
| Show Recipients Source # | |
Defined in Crypto.Age.Recipient Methods showsPrec :: Int -> Recipients -> ShowS # show :: Recipients -> String # showList :: [Recipients] -> ShowS # | |
| Eq Recipients Source # | |
Defined in Crypto.Age.Recipient | |
scrypt
data ScryptRecipient Source #
Constructors
| ScryptRecipient | |
Fields
| |
Instances
| Show ScryptRecipient Source # | |
Defined in Crypto.Age.Recipient Methods showsPrec :: Int -> ScryptRecipient -> ShowS # show :: ScryptRecipient -> String # showList :: [ScryptRecipient] -> ShowS # | |
| Eq ScryptRecipient Source # | |
Defined in Crypto.Age.Recipient Methods (==) :: ScryptRecipient -> ScryptRecipient -> Bool # (/=) :: ScryptRecipient -> ScryptRecipient -> Bool # | |
X25519
newtype X25519Recipient Source #
Constructors
| X25519Recipient | |
Fields
| |
Instances
| Show X25519Recipient Source # | |
Defined in Crypto.Age.Recipient Methods showsPrec :: Int -> X25519Recipient -> ShowS # show :: X25519Recipient -> String # showList :: [X25519Recipient] -> ShowS # | |
| Eq X25519Recipient Source # | |
Defined in Crypto.Age.Recipient Methods (==) :: X25519Recipient -> X25519Recipient -> Bool # (/=) :: X25519Recipient -> X25519Recipient -> Bool # | |
bytesToX25519Recipient :: ByteString -> Maybe X25519Recipient Source #
Construct an X25519Recipient from the raw bytes of a Curve25519 public
key.
If the provided byte string does not have a length of 32 (256 bits),
Nothing is returned.
x25519RecipientToBytes :: X25519Recipient -> ByteString Source #
Get the raw Curve25519 public key bytes associated with an
X25519Recipient.
encodeX25519Recipient :: X25519Recipient -> Either EncodingError Text Source #
Encode an X25519Recipient as
Bech32.
data DecodeX25519RecipientError Source #
Error decoding an X25519Recipient from Bech32.
Constructors
| DecodeX25519RecipientBech32DecodingError !DecodingError | Bech32 decoding error. |
| DecodeX25519RecipientInvalidHumanReadablePartError | Invalid Bech32 human-readable part. |
Fields
| |
| DecodeX25519RecipientInvalidDataPartError | Invalid Bech32 data part. |
| DecodeX25519RecipientInvalidSecretKeySizeError | Invalid Curve25519 secret key size. |
Instances
| Show DecodeX25519RecipientError Source # | |
Defined in Crypto.Age.Recipient Methods showsPrec :: Int -> DecodeX25519RecipientError -> ShowS # show :: DecodeX25519RecipientError -> String # showList :: [DecodeX25519RecipientError] -> ShowS # | |
| Eq DecodeX25519RecipientError Source # | |
Defined in Crypto.Age.Recipient Methods (==) :: DecodeX25519RecipientError -> DecodeX25519RecipientError -> Bool # (/=) :: DecodeX25519RecipientError -> DecodeX25519RecipientError -> Bool # | |
decodeX25519Recipient :: Text -> Either DecodeX25519RecipientError X25519Recipient Source #
Decode an X25519Recipient from
Bech32.