HsOpenSSL-0.11.4.18: 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 HmacCtx Source #

Constructors

HmacCtx (ForeignPtr HMAC_CTX) 

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.

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.

Instances
PKey RSAKeyPair Source # 
Instance details

Defined in OpenSSL.EVP.PKey

PKey RSAPubKey Source # 
Instance details

Defined in OpenSSL.EVP.PKey

PKey DSAKeyPair Source # 
Instance details

Defined in OpenSSL.EVP.PKey

PKey DSAPubKey Source # 
Instance details

Defined in OpenSSL.EVP.PKey

PKey SomeKeyPair Source # 
Instance details

Defined in OpenSSL.EVP.PKey

PKey SomePublicKey Source # 
Instance details

Defined in OpenSSL.EVP.PKey

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