HsOpenSSL-0.11.1.1: Partial OpenSSL binding for Haskell

Safe HaskellNone
LanguageHaskell98

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

class PKey k where

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

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' :: PKey k => k -> (Ptr EVP_PKEY -> IO a) -> IO a