Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data family AsType t
- class CastSigningKeyRole keyroleA keyroleB where
- castSigningKey ∷ SigningKey keyroleA → SigningKey keyroleB
- class CastVerificationKeyRole keyroleA keyroleB where
- castVerificationKey ∷ VerificationKey keyroleA → VerificationKey keyroleB
- class (Eq (VerificationKey keyrole), Show (VerificationKey keyrole), SerialiseAsRawBytes (Hash keyrole), HasTextEnvelope (VerificationKey keyrole), HasTextEnvelope (SigningKey keyrole)) ⇒ Key keyrole where
- data VerificationKey keyrole ∷ Type
- data SigningKey keyrole ∷ Type
- getVerificationKey ∷ SigningKey keyrole → VerificationKey keyrole
- deterministicSigningKey ∷ AsType keyrole → Seed → SigningKey keyrole
- deterministicSigningKeySeedSize ∷ AsType keyrole → Word
- verificationKeyHash ∷ VerificationKey keyrole → Hash keyrole
- generateSigningKey ∷ Key keyrole ⇒ AsType keyrole → IO (SigningKey keyrole)
Documentation
A family of singleton types used in this API to indicate which type to use where it would otherwise be ambiguous or merely unclear.
Values of this type are passed to deserialisation functions for example.
Instances
class CastSigningKeyRole keyroleA keyroleB where Source #
castSigningKey ∷ SigningKey keyroleA → SigningKey keyroleB Source #
Change the role of a SigningKey
, if the representation permits.
class CastVerificationKeyRole keyroleA keyroleB where Source #
Some key roles share the same representation and it is sometimes legitimate to change the role of a key.
castVerificationKey ∷ VerificationKey keyroleA → VerificationKey keyroleB Source #
Change the role of a VerificationKey
, if the representation permits.
Instances
class (Eq (VerificationKey keyrole), Show (VerificationKey keyrole), SerialiseAsRawBytes (Hash keyrole), HasTextEnvelope (VerificationKey keyrole), HasTextEnvelope (SigningKey keyrole)) ⇒ Key keyrole where Source #
An interface for cryptographic keys used for signatures with a SigningKey
and a VerificationKey
key.
This interface does not provide actual signing or verifying functions since this API is concerned with the management of keys: generating and serialising.
data VerificationKey keyrole ∷ Type Source #
The type of cryptographic verification key, for each key role.
data SigningKey keyrole ∷ Type Source #
The type of cryptographic signing key, for each key role.
getVerificationKey ∷ SigningKey keyrole → VerificationKey keyrole Source #
Get the corresponding verification key from a signing key.
deterministicSigningKey ∷ AsType keyrole → Seed → SigningKey keyrole Source #
Generate a SigningKey
deterministically, given a Seed
. The
required size of the seed is given by deterministicSigningKeySeedSize
.
deterministicSigningKeySeedSize ∷ AsType keyrole → Word Source #
verificationKeyHash ∷ VerificationKey keyrole → Hash keyrole Source #
Instances
generateSigningKey ∷ Key keyrole ⇒ AsType keyrole → IO (SigningKey keyrole) Source #
Generate a SigningKey
using a seed from operating system entropy.