cryptonite-0.27: Cryptography Primitives sink
License BSD-style
Maintainer Carlos Rodriguez-Vega <crodveg@yahoo.es>
Stability experimental
Portability unknown
Safe Haskell None
Language Haskell2010

Crypto.PubKey.Rabin.OAEP

Description

Synopsis

Documentation

data OAEPParams hash seed output Source #

Parameters for OAEP padding.

Constructors

OAEPParams

Fields

defaultOAEPParams :: ( ByteArrayAccess seed, ByteArray output, HashAlgorithm hash) => hash -> OAEPParams hash seed output Source #

Default Params with a specified hash function.

pad Source #

Arguments

:: HashAlgorithm hash
=> ByteString

Seed

-> OAEPParams hash ByteString ByteString

OAEP params to use

-> Int

size of public key in bytes

-> ByteString

Message pad

-> Either Error ByteString

Pad a message using OAEP.

unpad Source #

Arguments

:: HashAlgorithm hash
=> OAEPParams hash ByteString ByteString

OAEP params to use

-> Int

size of public key in bytes

-> ByteString

encoded message (not encrypted)

-> Either Error ByteString

Un-pad a OAEP encoded message.