unison-runtime-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Unison.Runtime.Crypto.Rsa

Synopsis

Documentation

parseRsaPublicKey :: ByteString -> Either Text PublicKey Source #

Parse a RSA public key from a ByteString The input bytestring is a hex-encoded string of the DER file for the public key. It can be generated with those commands: # generate a RSA key of a given size openssl genrsa -out private_key.pem size # output the DER format as a hex string openssl rsa -in private_key.pem -outform DER -pubout | xxd -p

parseRsaPrivateKey :: ByteString -> Either Text PrivateKey Source #

Parse a RSA private key from a ByteString The input bytestring is a hex-encoded string of the DER file for the private key. It can be generated with those commands: # generate a RSA key of a given size openssl genrsa -out private_key.pem size # output the DER format as a hex string openssl rsa -in private_key.pem -outform DER | xxd -p

rsaErrorToText :: Error -> Text Source #

Display a RSA Error