Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Encoding and decoding of RSA keys using the ASN.1 DER format
Synopsis
- toDERPub :: RSAKey k => k -> ByteString
- fromDERPub :: ByteString -> Maybe RSAPubKey
- toDERPriv :: RSAKeyPair -> ByteString
- fromDERPriv :: RSAKey k => ByteString -> Maybe k
Documentation
:: RSAKey k | |
=> k | You can pass either |
-> ByteString | The public key information encoded in ASN.1 DER |
Dump a public key to ASN.1 DER format
fromDERPub :: ByteString -> Maybe RSAPubKey Source #
Parse a public key from ASN.1 DER format
toDERPriv :: RSAKeyPair -> ByteString Source #
Dump a private key to ASN.1 DER format
:: RSAKey k | |
=> ByteString | The private key information encoded in ASN.1 DER |
-> Maybe k | This can return either |
Parse a private key from ASN.1 DER format