HsOpenSSL-0.3: (Part of) OpenSSL binding for HaskellContentsIndex
OpenSSL.EVP.Cipher
Description
An interface to symmetric cipher algorithms.
Synopsis
data Cipher
getCipherByName :: String -> IO (Maybe Cipher)
getCipherNames :: IO [String]
data CryptoMode
= Encrypt
| Decrypt
cipher :: Cipher -> String -> String -> CryptoMode -> String -> IO String
cipherBS :: Cipher -> String -> String -> CryptoMode -> ByteString -> IO ByteString
cipherLBS :: Cipher -> String -> String -> CryptoMode -> LazyByteString -> IO LazyByteString
Documentation
data Cipher
Cipher is an opaque object that represents an algorithm of symmetric cipher.
getCipherByName :: String -> IO (Maybe Cipher)
getCipherByName name returns a symmetric cipher algorithm whose name is name. If no algorithms are found, the result is Nothing.
getCipherNames :: IO [String]
getCipherNames returns a list of name of symmetric cipher algorithms.
data CryptoMode
CryptoMode represents instruction to cipher and such like.
Constructors
Encrypt
Decrypt
cipher
:: Cipheralgorithm to use
-> Stringsymmetric key
-> StringIV
-> CryptoModeoperation
-> StringAn input string to encrypt/decrypt. Note that the string must not contain any letters which aren't in the range of U+0000 - U+00FF.
-> IO Stringthe result string
cipher lazilly encrypts or decrypts a stream of data. The input string doesn't necessarily have to be finite.
cipherBS
:: Cipheralgorithm to use
-> Stringsymmetric key
-> StringIV
-> CryptoModeoperation
-> ByteStringinput string to encrypt/decrypt
-> IO ByteStringthe result string
cipherBS strictly encrypts or decrypts a chunk of data.
cipherLBS
:: Cipheralgorithm to use
-> Stringsymmetric key
-> StringIV
-> CryptoModeoperation
-> LazyByteStringinput string to encrypt/decrypt
-> IO LazyByteStringthe result string
cipherLBS lazilly encrypts or decrypts a stream of data. The input string doesn't necessarily have to be finite.
Produced by Haddock version 0.8