Safe Haskell | None |
---|---|
Language | Haskell2010 |
An interface to message digest algorithms.
- data Digest
- getDigestByName :: String -> IO (Maybe Digest)
- getDigestNames :: IO [String]
- digest :: Digest -> String -> String
- digestBS :: Digest -> ByteString -> ByteString
- digestLBS :: Digest -> ByteString -> ByteString
- hmacBS :: Digest -> ByteString -> ByteString -> ByteString
- hmacLBS :: Digest -> ByteString -> ByteString -> ByteString
- pkcs5_pbkdf2_hmac_sha1 :: ByteString -> ByteString -> Int -> Int -> ByteString
Documentation
getDigestByName :: String -> IO (Maybe Digest) Source #
returns a message digest algorithm whose
name is getDigestByName
namename
. If no algorithms are found, the result is
Nothing
.
getDigestNames :: IO [String] Source #
returns a list of name of message digest
algorithms.getDigestNames
digest :: Digest -> String -> String Source #
Deprecated: Use digestBS or digestLBS instead.
digests a stream of data. The string must
not contain any letters which aren't in the range of U+0000 -
U+00FF.digest
digestBS :: Digest -> ByteString -> ByteString Source #
digests a chunk of data.digestBS
digestLBS :: Digest -> ByteString -> ByteString Source #
digests a stream of data.digestLBS
:: 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
hmacLBS :: Digest -> ByteString -> ByteString -> ByteString Source #
pkcs5_pbkdf2_hmac_sha1 Source #
:: ByteString | password |
-> ByteString | salt |
-> Int | iterations |
-> Int | destination key length |
-> ByteString | destination key |
Calculate a PKCS5-PBKDF2 SHA1-HMAC suitable for password hashing.