jose-0.3.41.0: Javascript Object Signing and Encryption and JSON Web Token library

Safe HaskellNone
LanguageHaskell98

Crypto.JOSE.Classes

Description

Type classes for use with the JOSE modules.

Synopsis

Documentation

class Key k where Source

A Key that can sign messages and validate signatures according to a given Alg.

Can fail with AlgorithmMismatch

Associated Types

type KeyGenParam k Source

type KeyContent k Source

Methods

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

public :: k -> Maybe k Source

Remove secrets from a key