-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | crypton conduit
--   
--   Conduit bridge for crypton
--   
--   For now only provide a conduit version for hash and hmac, but with
--   contribution, this could provide cipher conduits too, and probably
--   other things.
@package crypton-conduit
@version 0.2.3

module Crypto.Cipher.ChaChaPoly1305.Conduit
encrypt :: forall (m :: Type -> Type). MonadThrow m => ByteString -> ByteString -> ConduitM ByteString ByteString m ()
decrypt :: forall (m :: Type -> Type). MonadThrow m => ByteString -> ConduitM ByteString ByteString m ()
data ChaChaException
EncryptNonceException :: !CryptoError -> ChaChaException
EncryptKeyException :: !CryptoError -> ChaChaException
DecryptNonceException :: !CryptoError -> ChaChaException
DecryptKeyException :: !CryptoError -> ChaChaException
MismatchedAuth :: ChaChaException
instance GHC.Internal.Exception.Type.Exception Crypto.Cipher.ChaChaPoly1305.Conduit.ChaChaException
instance GHC.Internal.Show.Show Crypto.Cipher.ChaChaPoly1305.Conduit.ChaChaException

-- | A module containing Conduit facilities for hash based functions.
--   
--   this module is vaguely similar to the crypto-conduit part related to
--   hash on purpose, as to provide an upgrade path. The api documentation
--   is pulled directly from this package and adapted, and thus are
--   originally copyright Felipe Lessa.
module Crypto.Hash.Conduit

-- | A Sink that hashes a stream of ByteStrings and
--   creates a digest d.
sinkHash :: forall (m :: Type -> Type) hash o. (Monad m, HashAlgorithm hash) => ConduitT ByteString o m (Digest hash)

-- | Hashes the whole contents of the given file in constant memory. This
--   function is just a convenient wrapper around sinkHash defined
--   as:
--   
--   
--   hashFile fp = liftIO $ runConduitRes (sourceFile fp .| sinkHash)
--   
hashFile :: (MonadIO m, HashAlgorithm hash) => FilePath -> m (Digest hash)

-- | A module containing Conduit facilities for hmac based functions.
module Crypto.MAC.HMAC.Conduit

-- | A Sink that calculates HMAC of a stream of
--   ByteStrings and returns digest d.
sinkHMAC :: forall (m :: Type -> Type) key hash o. (Monad m, ByteArrayAccess key, HashAlgorithm hash) => key -> ConduitM ByteString o m (HMAC hash)

module Crypto.PubKey.ECIES.Conduit
encrypt :: forall (m :: Type -> Type). (MonadThrow m, MonadRandom m) => Point Curve -> ConduitM ByteString ByteString m ()
decrypt :: forall (m :: Type -> Type). MonadThrow m => Scalar Curve -> ConduitM ByteString ByteString m ()
