HsOpenSSL-0.10.3.3: (Incomplete) OpenSSL binding for Haskell

Safe HaskellNone

OpenSSL.EVP.Digest

Description

An interface to message digest algorithms.

Synopsis

Documentation

data Digest

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

getDigestByName :: String -> IO (Maybe Digest)

getDigestByName name returns a message digest algorithm whose name is name. If no algorithms are found, the result is Nothing.

getDigestNames :: IO [String]

getDigestNames returns a list of name of message digest algorithms.

digest :: Digest -> String -> String

digest digests a stream of data. The string must not contain any letters which aren't in the range of U+0000 - U+00FF.

digestBS :: Digest -> ByteString -> String

digestBS digests a chunk of data.

digestBS' :: Digest -> ByteString -> ByteString

Same as digestBS but returns ByteString instead.

digestLBS :: Digest -> ByteString -> String

digestLBS digests a stream of data.

hmacBS

Arguments

:: Digest

the hash function to use in the HMAC calculation

-> ByteString

the HMAC key

-> ByteString

the data to be signed

-> ByteString

resulting HMAC

Perform a private key signing using the HMAC template with a given hash

pkcs5_pbkdf2_hmac_sha1

Arguments

:: ByteString

password

-> ByteString

salt

-> Int

iterations

-> Int

destination key length

-> ByteString

destination key

Calculate a PKCS5-PBKDF2 SHA1-HMAC suitable for password hashing.