HsOpenSSL-0.11.3.2: Partial OpenSSL binding for Haskell

Safe HaskellNone
LanguageHaskell2010

OpenSSL.EVP.Internal

Synopsis

Documentation

newtype Cipher Source #

Cipher is an opaque object that represents an algorithm of symmetric cipher.

Constructors

Cipher (Ptr EVP_CIPHER) 

data CryptoMode Source #

CryptoMode represents instruction to cipher and such like.

Constructors

Encrypt 
Decrypt 

newtype Digest Source #

Digest is an opaque object that represents an algorithm of message digest.

Constructors

Digest (Ptr EVP_MD) 

withMDPtr :: Digest -> (Ptr EVP_MD -> IO a) -> IO a Source #

newtype VaguePKey Source #

VaguePKey is a ForeignPtr to EVP_PKEY, that is either public key or a ker pair. We can't tell which at compile time.

Constructors

VaguePKey (ForeignPtr EVP_PKEY) 

class PKey k where Source #

Instances of class PKey can be converted back and forth to VaguePKey.

Minimal complete definition

toPKey, fromPKey, pkeySize, pkeyDefaultMD

Methods

toPKey :: k -> IO VaguePKey Source #

Wrap the key (i.g. RSA) into EVP_PKEY.

fromPKey :: VaguePKey -> IO (Maybe k) Source #

Extract the concrete key from the EVP_PKEY. Returns Nothing if the type mismatches.

pkeySize :: k -> Int Source #

Do the same as EVP_PKEY_size().

pkeyDefaultMD :: k -> IO Digest Source #

Return the default digesting algorithm for the key.

withPKeyPtr' :: PKey k => k -> (Ptr EVP_PKEY -> IO a) -> IO a Source #