File: Record.hs

package info (click to toggle)
haskell-tls 2.1.8-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,056 kB
  • sloc: haskell: 15,695; makefile: 3
file content (36 lines) | stat: -rw-r--r-- 924 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
-- | The Record Protocol takes messages to be transmitted, fragments
-- the data into manageable blocks, optionally compresses the data,
-- applies a MAC, encrypts, and transmits the result.  Received data
-- is decrypted, verified, decompressed, reassembled, and then
-- delivered to higher-level clients.
module Network.TLS.Record (
    Record (..),

    -- * Fragment manipulation types
    Fragment,
    fragmentGetBytes,
    fragmentPlaintext,
    fragmentCiphertext,
    recordToRaw,
    rawToRecord,
    recordToHeader,
    Plaintext,
    Ciphertext,

    -- * Encrypt and decrypt from the record layer
    encryptRecord,
    decryptRecord,

    -- * State tracking
    RecordM,
    runRecordM,
    RecordState (..),
    newRecordState,
    getRecordVersion,
    setRecordIV,
) where

import Network.TLS.Record.Decrypt
import Network.TLS.Record.Encrypt
import Network.TLS.Record.State
import Network.TLS.Record.Types