Safe Haskell | None |
---|---|
Language | Haskell98 |
Type classes for use with the JOSE modules.
- module Crypto.Random
- class Key k where
- type KeyGenParam k
- type KeyContent k
- gen :: CPRG g => KeyGenParam k -> g -> (k, g)
- fromKeyContent :: KeyContent k -> k
- sign :: CPRG g => Alg -> k -> g -> ByteString -> (Either Error ByteString, g)
- verify :: Alg -> k -> ByteString -> ByteString -> Either Error Bool
- public :: k -> Maybe k
Documentation
module Crypto.Random
A Key that can sign messages and validate signatures according
to a given Alg
.
Can fail with AlgorithmMismatch
type KeyGenParam k Source
type KeyContent k Source
gen :: CPRG g => KeyGenParam k -> g -> (k, g) Source
fromKeyContent :: KeyContent k -> k Source
sign :: CPRG g => Alg -> k -> g -> ByteString -> (Either Error ByteString, g) Source
verify :: Alg -> k -> ByteString -> ByteString -> Either Error Bool Source
Remove secrets from a key