File: Stream.hs

package info (click to toggle)
haskell-crypton 1.0.4-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 3,548 kB
  • sloc: haskell: 26,764; ansic: 22,294; makefile: 6
file content (19 lines) | stat: -rw-r--r-- 549 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
-- |
-- Module      : Crypto.Cipher.Types.Stream
-- License     : BSD-style
-- Maintainer  : Vincent Hanquez <vincent@snarc.org>
-- Stability   : Stable
-- Portability : Excellent
--
-- Stream cipher basic types
module Crypto.Cipher.Types.Stream (
    StreamCipher (..),
) where

import Crypto.Cipher.Types.Base
import Crypto.Internal.ByteArray (ByteArray)

-- | Symmetric stream cipher class
class Cipher cipher => StreamCipher cipher where
    -- | Combine using the stream cipher
    streamCombine :: ByteArray ba => cipher -> ba -> (ba, cipher)