HsOpenSSL-0.11.4.13: Partial OpenSSL binding for Haskell

Safe HaskellNone
LanguageHaskell2010

OpenSSL.DER

Description

Encoding and decoding of RSA keys using the ASN.1 DER format

Synopsis

Documentation

toDERPub Source #

Arguments

:: RSAKey k 
=> k

You can pass either RSAPubKey or RSAKeyPair because both contain the necessary information.

-> 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

fromDERPriv Source #

Arguments

:: RSAKey k 
=> ByteString

The private key information encoded in ASN.1 DER

-> Maybe k

This can return either RSAPubKey or RSAKeyPair because there’s sufficient information for both.

Parse a private key from ASN.1 DER format