Crypto.Types

crypto-api-0.13.2: A generic interface for cryptographic operations

Safe Haskell | Safe
Language | Haskell98

Crypto.Types

Description

Type aliases used throughout the crypto-api modules.

Synopsis

- data IV k = IV {
  - initializationVector :: !ByteString
  }
- type BitLength = Int
- type ByteLength = Int
- data BlockCipherError
  - = InputTooLong String
  - | AuthenticationFailed String
  - | Other String

# Documentation

data IV k

Initilization Vectors for BlockCipher implementations (IV k) are used for various modes and guarrenteed to be blockSize bits long. The common ways to obtain an IV are to generate one (`getIV` or `getIVIO`) or to use one provided with the ciphertext (using the `Serialize` instance of IV).

`zeroIV` also exists and is of particular use for starting `ctr` mode with a fresh key.

Constructors

IV |
Fields initializationVector :: !ByteString

Instances

Eq (IV k) |
Ord (IV k) |
Show (IV k) |

type BitLength = Int

The length of a field (usually a ByteString) in bits

type ByteLength = Int

The length fo a field in bytes.

data BlockCipherError

Constructors

InputTooLong String |
AuthenticationFailed String |
Other String |

Instances

Eq BlockCipherError |
Data BlockCipherError |
Ord BlockCipherError |
Read BlockCipherError |
Show BlockCipherError |
Exception BlockCipherError |