HsOpenSSL-0.11.4.9: Partial OpenSSL binding for Haskell

Safe HaskellNone
LanguageHaskell2010

OpenSSL.EVP.Internal

Synopsis

Documentation

newtype Cipher #

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

Constructors

Cipher (Ptr EVP_CIPHER) 

data CryptoMode #

CryptoMode represents instruction to cipher and such like.

Constructors

Encrypt 
Decrypt 

newtype Digest #

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

Constructors

Digest (Ptr EVP_MD) 

data EVP_MD #

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

newtype DigestCtx #

newtype HmacCtx #

Constructors

HmacCtx (ForeignPtr HMAC_CTX) 

data HMAC_CTX #

newtype VaguePKey #

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) 

data EVP_PKEY #

class PKey k where #

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

Minimal complete definition

toPKey, fromPKey, pkeySize, pkeyDefaultMD

Methods

toPKey :: k -> IO VaguePKey #

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

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

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

pkeySize :: k -> Int #

Do the same as EVP_PKEY_size().

pkeyDefaultMD :: k -> IO Digest #

Return the default digesting algorithm for the key.

withPKeyPtr :: VaguePKey -> (Ptr EVP_PKEY -> IO a) -> IO a #

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