Generate a JWK. Apart from key parameters, no other parameters are set.
Modulejose-0.10.0.1Haskell2010
Crypto.JOSE.JWK
A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. This module also defines a JSON Web Key Set (JWK Set) JSON data structure for representing a set of JWKs.
-- Generate RSA JWK and set "kid" param to
-- base64url-encoded SHA-256 thumbprint of key.
--
doGen :: IO JWK
doGen = do
jwk <- genJWK (RSAGenParam (4096 `div` 8))
let
h = view thumbprint jwk :: Digest SHA256
kid = view (re (base64url . digest) . utf8) h
pure $ set jwkKid (Just kid) jwk
- 54 types
- 3 classes
- 32 values
- Packagejose-0.10.0.1
- Exports89
- LanguageHaskell2010
- LicenceApache-2.0
- SourceJWK.hs
JWK generation
6 declarationsKeygen parameters.
Constructors
ECGenParam CrvGenerate an EC key with specified curve.
RSAGenParam IntGenerate an RSA key with specified size in bytes.
OctGenParam IntGenerate a symmetric key with specified size in bytes.
OKPGenParam OKPCrvGenerate an EdDSA or Edwards ECDH key with specified curve.
Instances2Eq, Show
Eq KeyMaterialGenParamDefined in jose-0.10.0.1 · Crypto.JOSE.JWA.JWKShow KeyMaterialGenParamDefined in jose-0.10.0.1 · Crypto.JOSE.JWA.JWK
Instances5Eq, Ord, Show, FromJSON, ToJSON
RFC 7517 §4. JSON Web Key (JWK) Format
Instances6Eq, Show, FromJSON, ToJSON, AsPublicKey, VerificationKeyStore
Eq JWKDefined in jose-0.10.0.1 · Crypto.JOSE.JWKShow JWKDefined in jose-0.10.0.1 · Crypto.JOSE.JWKFromJSON JWKDefined in jose-0.10.0.1 · Crypto.JOSE.JWKToJSON JWKDefined in jose-0.10.0.1 · Crypto.JOSE.JWKAsPublicKey JWKDefined in jose-0.10.0.1 · Crypto.JOSE.JWKApplicative m => VerificationKeyStore m h s JWKDefined in jose-0.10.0.1 · Crypto.JOSE.JWK.StoreUse a JWK as a VerificationKeyStore. Can be used with any payload type. Header and payload are ignored. No filtering is performed.
Keys that may have have public material
Methods
asPublicKey :: Getter k (Maybe k)Get the public key
Instances5AsPublicKey
AsPublicKey ECKeyParametersDefined in jose-0.10.0.1 · Crypto.JOSE.JWA.JWKAsPublicKey KeyMaterialDefined in jose-0.10.0.1 · Crypto.JOSE.JWA.JWKAsPublicKey OKPKeyParametersDefined in jose-0.10.0.1 · Crypto.JOSE.JWA.JWKAsPublicKey RSAKeyParametersDefined in jose-0.10.0.1 · Crypto.JOSE.JWA.JWKAsPublicKey JWKDefined in jose-0.10.0.1 · Crypto.JOSE.JWK
Parts of a JWK
13 declarationsInstances5Eq, Ord, Show, FromJSON, ToJSON
RFC 7517 §4.3. "key_ops" (Key Operations) Parameter
Instances5Eq, Ord, Show, FromJSON, ToJSON
RFC 7517 §4.4. "alg" (Algorithm) Parameter
See also RFC 7518 §6.4. which states that for "oct" keys, an "alg" member SHOULD be present to identify the algorithm intended to be used with the key, unless the application uses another means or convention to determine the algorithm used.
Get the certificate chain. Not a lens, because the key of the first certificate in the chain must correspond be the public key of the JWK. To set the certificate chain use setJWKX5c.
Set the "x5c" Certificate Chain parameter. If setting the list,
checks that the key in the first certificate matches the JWK; returns
Nothing if it does not.
Converting from other key formats
4 declarationsConvert RSA private key into a JWK
Convert octet string into a JWK
Convert an X.509 certificate into a JWK.
Supports RSA and ECDSA (when the curve is supported). Other key types will throw AlgorithmNotImplemented.
The "x5c" field of the resulting JWK contains the certificate.
JWK Thumbprint
63 declarationsCompute the JWK Thumbprint of a JWK
Prism from ByteString to HashAlgorithm a => Digest a.
Use re digest to view the bytes of a digest
Try to transform a bytearray into a Digest of specific algorithm.
If the digest is not the right size for the algorithm specified, then Nothing is returned.
Hash a strict bytestring into a digest.
Finalize a context and return a digest.
Update the context with the first N bytes of a bytestring and return the digest. The code path is independent from N but much slower than a normal hashUpdate. The function can be called for the last bytes of a message, in order to exclude a variable padding, without leaking the padding length. The begining of the message, never impacted by the padding, should preferably go through hashUpdate for better performance.
Initialize a new context for this hash algorithm
Initialize a new context for a specified hash algorithm
Hash the first N bytes of a bytestring, with code path independent from N.
Run the hashPrefix function but takes an explicit hash algorithm parameter
run hashUpdates on one single bytestring and return the updated context.
Update the context with a list of strict bytestring, and return a new context with the updates.
Run the hash function but takes an explicit hash algorithm parameter
Hash a lazy bytestring into a digest.
Fast cryptographic hash.
It is especially known to target 64bits architectures.
Known supported digest sizes:
Blake2b 160
Blake2b 224
Blake2b 256
Blake2b 384
Blake2b 512
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
KnownNat bitlen => Data (Blake2b bitlen)Defined in cryptonite-0.30 · Crypto.Hash.Blake2Show (Blake2b bitlen)Defined in cryptonite-0.30 · Crypto.Hash.Blake2(IsDivisibleBy8 bitlen, KnownNat bitlen, IsAtLeast bitlenDefined in cryptonite-0.30 · Crypto.Hash.Blake28
, IsAtMost bitlen512
) => HashAlgorithm (Blake2b bitlen)type HashBlockSize (Blake2b bitlen) =Defined in cryptonite-0.30 · Crypto.Hash.Blake2128
type HashDigestSize (Blake2b bitlen) = Div8 bitlenDefined in cryptonite-0.30 · Crypto.Hash.Blake2type HashInternalContextSize (Blake2b bitlen) =Defined in cryptonite-0.30 · Crypto.Hash.Blake2248
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
KnownNat bitlen => Data (Blake2bp bitlen)Defined in cryptonite-0.30 · Crypto.Hash.Blake2Show (Blake2bp bitlen)Defined in cryptonite-0.30 · Crypto.Hash.Blake2(IsDivisibleBy8 bitlen, KnownNat bitlen, IsAtLeast bitlenDefined in cryptonite-0.30 · Crypto.Hash.Blake28
, IsAtMost bitlen512
) => HashAlgorithm (Blake2bp bitlen)type HashBlockSize (Blake2bp bitlen) =Defined in cryptonite-0.30 · Crypto.Hash.Blake2128
type HashDigestSize (Blake2bp bitlen) = Div8 bitlenDefined in cryptonite-0.30 · Crypto.Hash.Blake2type HashInternalContextSize (Blake2bp bitlen) =Defined in cryptonite-0.30 · Crypto.Hash.Blake22325
Fast and secure alternative to SHA1 and HMAC-SHA1
It is espacially known to target 32bits architectures.
Known supported digest sizes:
Blake2s 160
Blake2s 224
Blake2s 256
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
KnownNat bitlen => Data (Blake2s bitlen)Defined in cryptonite-0.30 · Crypto.Hash.Blake2Show (Blake2s bitlen)Defined in cryptonite-0.30 · Crypto.Hash.Blake2(IsDivisibleBy8 bitlen, KnownNat bitlen, IsAtLeast bitlenDefined in cryptonite-0.30 · Crypto.Hash.Blake28
, IsAtMost bitlen256
) => HashAlgorithm (Blake2s bitlen)type HashBlockSize (Blake2s bitlen) =Defined in cryptonite-0.30 · Crypto.Hash.Blake264
type HashDigestSize (Blake2s bitlen) = Div8 bitlenDefined in cryptonite-0.30 · Crypto.Hash.Blake2type HashInternalContextSize (Blake2s bitlen) =Defined in cryptonite-0.30 · Crypto.Hash.Blake2136
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
KnownNat bitlen => Data (Blake2sp bitlen)Defined in cryptonite-0.30 · Crypto.Hash.Blake2Show (Blake2sp bitlen)Defined in cryptonite-0.30 · Crypto.Hash.Blake2(IsDivisibleBy8 bitlen, KnownNat bitlen, IsAtLeast bitlenDefined in cryptonite-0.30 · Crypto.Hash.Blake28
, IsAtMost bitlen256
) => HashAlgorithm (Blake2sp bitlen)type HashBlockSize (Blake2sp bitlen) =Defined in cryptonite-0.30 · Crypto.Hash.Blake264
type HashDigestSize (Blake2sp bitlen) = Div8 bitlenDefined in cryptonite-0.30 · Crypto.Hash.Blake2type HashInternalContextSize (Blake2sp bitlen) =Defined in cryptonite-0.30 · Crypto.Hash.Blake22185
Blake2b (160 bits) cryptographic hash algorithm
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
Data Blake2b_160Defined in cryptonite-0.30 · Crypto.Hash.Blake2bShow Blake2b_160Defined in cryptonite-0.30 · Crypto.Hash.Blake2bHashAlgorithm Blake2b_160Defined in cryptonite-0.30 · Crypto.Hash.Blake2btype HashBlockSize Blake2b_160 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2b128
type HashDigestSize Blake2b_160 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2b20
type HashInternalContextSize Blake2b_160 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2b248
Blake2b (224 bits) cryptographic hash algorithm
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
Data Blake2b_224Defined in cryptonite-0.30 · Crypto.Hash.Blake2bShow Blake2b_224Defined in cryptonite-0.30 · Crypto.Hash.Blake2bHashAlgorithm Blake2b_224Defined in cryptonite-0.30 · Crypto.Hash.Blake2btype HashBlockSize Blake2b_224 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2b128
type HashDigestSize Blake2b_224 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2b28
type HashInternalContextSize Blake2b_224 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2b248
Blake2b (256 bits) cryptographic hash algorithm
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
Data Blake2b_256Defined in cryptonite-0.30 · Crypto.Hash.Blake2bShow Blake2b_256Defined in cryptonite-0.30 · Crypto.Hash.Blake2bHashAlgorithm Blake2b_256Defined in cryptonite-0.30 · Crypto.Hash.Blake2btype HashBlockSize Blake2b_256 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2b128
type HashDigestSize Blake2b_256 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2b32
type HashInternalContextSize Blake2b_256 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2b248
Blake2b (384 bits) cryptographic hash algorithm
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
Data Blake2b_384Defined in cryptonite-0.30 · Crypto.Hash.Blake2bShow Blake2b_384Defined in cryptonite-0.30 · Crypto.Hash.Blake2bHashAlgorithm Blake2b_384Defined in cryptonite-0.30 · Crypto.Hash.Blake2btype HashBlockSize Blake2b_384 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2b128
type HashDigestSize Blake2b_384 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2b48
type HashInternalContextSize Blake2b_384 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2b248
Blake2b (512 bits) cryptographic hash algorithm
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
Data Blake2b_512Defined in cryptonite-0.30 · Crypto.Hash.Blake2bShow Blake2b_512Defined in cryptonite-0.30 · Crypto.Hash.Blake2bHashAlgorithm Blake2b_512Defined in cryptonite-0.30 · Crypto.Hash.Blake2btype HashBlockSize Blake2b_512 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2b128
type HashDigestSize Blake2b_512 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2b64
type HashInternalContextSize Blake2b_512 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2b248
Blake2bp (512 bits) cryptographic hash algorithm
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
Data Blake2bp_512Defined in cryptonite-0.30 · Crypto.Hash.Blake2bpShow Blake2bp_512Defined in cryptonite-0.30 · Crypto.Hash.Blake2bpHashAlgorithm Blake2bp_512Defined in cryptonite-0.30 · Crypto.Hash.Blake2bptype HashBlockSize Blake2bp_512 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2bp128
type HashDigestSize Blake2bp_512 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2bp64
type HashInternalContextSize Blake2bp_512 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2bp1768
Blake2s (160 bits) cryptographic hash algorithm
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
Data Blake2s_160Defined in cryptonite-0.30 · Crypto.Hash.Blake2sShow Blake2s_160Defined in cryptonite-0.30 · Crypto.Hash.Blake2sHashAlgorithm Blake2s_160Defined in cryptonite-0.30 · Crypto.Hash.Blake2stype HashBlockSize Blake2s_160 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2s64
type HashDigestSize Blake2s_160 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2s20
type HashInternalContextSize Blake2s_160 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2s136
Blake2s (224 bits) cryptographic hash algorithm
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
Data Blake2s_224Defined in cryptonite-0.30 · Crypto.Hash.Blake2sShow Blake2s_224Defined in cryptonite-0.30 · Crypto.Hash.Blake2sHashAlgorithm Blake2s_224Defined in cryptonite-0.30 · Crypto.Hash.Blake2stype HashBlockSize Blake2s_224 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2s64
type HashDigestSize Blake2s_224 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2s28
type HashInternalContextSize Blake2s_224 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2s136
Blake2s (256 bits) cryptographic hash algorithm
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
Data Blake2s_256Defined in cryptonite-0.30 · Crypto.Hash.Blake2sShow Blake2s_256Defined in cryptonite-0.30 · Crypto.Hash.Blake2sHashAlgorithm Blake2s_256Defined in cryptonite-0.30 · Crypto.Hash.Blake2stype HashBlockSize Blake2s_256 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2s64
type HashDigestSize Blake2s_256 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2s32
type HashInternalContextSize Blake2s_256 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2s136
Blake2sp (224 bits) cryptographic hash algorithm
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
Data Blake2sp_224Defined in cryptonite-0.30 · Crypto.Hash.Blake2spShow Blake2sp_224Defined in cryptonite-0.30 · Crypto.Hash.Blake2spHashAlgorithm Blake2sp_224Defined in cryptonite-0.30 · Crypto.Hash.Blake2sptype HashBlockSize Blake2sp_224 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2sp64
type HashDigestSize Blake2sp_224 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2sp28
type HashInternalContextSize Blake2sp_224 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2sp1752
Blake2sp (256 bits) cryptographic hash algorithm
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
Data Blake2sp_256Defined in cryptonite-0.30 · Crypto.Hash.Blake2spShow Blake2sp_256Defined in cryptonite-0.30 · Crypto.Hash.Blake2spHashAlgorithm Blake2sp_256Defined in cryptonite-0.30 · Crypto.Hash.Blake2sptype HashBlockSize Blake2sp_256 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2sp64
type HashDigestSize Blake2sp_256 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2sp32
type HashInternalContextSize Blake2sp_256 =Defined in cryptonite-0.30 · Crypto.Hash.Blake2sp1752
Keccak (224 bits) cryptographic hash algorithm
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
Data Keccak_224Defined in cryptonite-0.30 · Crypto.Hash.KeccakShow Keccak_224Defined in cryptonite-0.30 · Crypto.Hash.KeccakHashAlgorithm Keccak_224Defined in cryptonite-0.30 · Crypto.Hash.Keccaktype HashBlockSize Keccak_224 =Defined in cryptonite-0.30 · Crypto.Hash.Keccak144
type HashDigestSize Keccak_224 =Defined in cryptonite-0.30 · Crypto.Hash.Keccak28
type HashInternalContextSize Keccak_224 =Defined in cryptonite-0.30 · Crypto.Hash.Keccak352
Keccak (256 bits) cryptographic hash algorithm
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
Data Keccak_256Defined in cryptonite-0.30 · Crypto.Hash.KeccakShow Keccak_256Defined in cryptonite-0.30 · Crypto.Hash.KeccakHashAlgorithm Keccak_256Defined in cryptonite-0.30 · Crypto.Hash.Keccaktype HashBlockSize Keccak_256 =Defined in cryptonite-0.30 · Crypto.Hash.Keccak136
type HashDigestSize Keccak_256 =Defined in cryptonite-0.30 · Crypto.Hash.Keccak32
type HashInternalContextSize Keccak_256 =Defined in cryptonite-0.30 · Crypto.Hash.Keccak344
Keccak (384 bits) cryptographic hash algorithm
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
Data Keccak_384Defined in cryptonite-0.30 · Crypto.Hash.KeccakShow Keccak_384Defined in cryptonite-0.30 · Crypto.Hash.KeccakHashAlgorithm Keccak_384Defined in cryptonite-0.30 · Crypto.Hash.Keccaktype HashBlockSize Keccak_384 =Defined in cryptonite-0.30 · Crypto.Hash.Keccak104
type HashDigestSize Keccak_384 =Defined in cryptonite-0.30 · Crypto.Hash.Keccak48
type HashInternalContextSize Keccak_384 =Defined in cryptonite-0.30 · Crypto.Hash.Keccak312
Keccak (512 bits) cryptographic hash algorithm
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
Data Keccak_512Defined in cryptonite-0.30 · Crypto.Hash.KeccakShow Keccak_512Defined in cryptonite-0.30 · Crypto.Hash.KeccakHashAlgorithm Keccak_512Defined in cryptonite-0.30 · Crypto.Hash.Keccaktype HashBlockSize Keccak_512 =Defined in cryptonite-0.30 · Crypto.Hash.Keccak72
type HashDigestSize Keccak_512 =Defined in cryptonite-0.30 · Crypto.Hash.Keccak64
type HashInternalContextSize Keccak_512 =Defined in cryptonite-0.30 · Crypto.Hash.Keccak280
MD2 cryptographic hash algorithm
Instances7Data, Show, HashAlgorithm, HashAlgorithmASN1, HashBlockSize, HashDigestSize, …
Data MD2Defined in cryptonite-0.30 · Crypto.Hash.MD2Show MD2Defined in cryptonite-0.30 · Crypto.Hash.MD2HashAlgorithm MD2Defined in cryptonite-0.30 · Crypto.Hash.MD2HashAlgorithmASN1 MD2Defined in cryptonite-0.30 · Crypto.PubKey.RSA.PKCS15type HashBlockSize MD2 =Defined in cryptonite-0.30 · Crypto.Hash.MD216
type HashDigestSize MD2 =Defined in cryptonite-0.30 · Crypto.Hash.MD216
type HashInternalContextSize MD2 =Defined in cryptonite-0.30 · Crypto.Hash.MD296
MD4 cryptographic hash algorithm
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
Data MD4Defined in cryptonite-0.30 · Crypto.Hash.MD4Show MD4Defined in cryptonite-0.30 · Crypto.Hash.MD4HashAlgorithm MD4Defined in cryptonite-0.30 · Crypto.Hash.MD4type HashBlockSize MD4 =Defined in cryptonite-0.30 · Crypto.Hash.MD464
type HashDigestSize MD4 =Defined in cryptonite-0.30 · Crypto.Hash.MD416
type HashInternalContextSize MD4 =Defined in cryptonite-0.30 · Crypto.Hash.MD496
MD5 cryptographic hash algorithm
Instances8Data, Show, HashAlgorithm, HashAlgorithmPrefix, HashAlgorithmASN1, HashBlockSize, …
Data MD5Defined in cryptonite-0.30 · Crypto.Hash.MD5Show MD5Defined in cryptonite-0.30 · Crypto.Hash.MD5HashAlgorithm MD5Defined in cryptonite-0.30 · Crypto.Hash.MD5HashAlgorithmPrefix MD5Defined in cryptonite-0.30 · Crypto.Hash.MD5HashAlgorithmASN1 MD5Defined in cryptonite-0.30 · Crypto.PubKey.RSA.PKCS15type HashBlockSize MD5 =Defined in cryptonite-0.30 · Crypto.Hash.MD564
type HashDigestSize MD5 =Defined in cryptonite-0.30 · Crypto.Hash.MD516
type HashInternalContextSize MD5 =Defined in cryptonite-0.30 · Crypto.Hash.MD596
RIPEMD160 cryptographic hash algorithm
Instances7Data, Show, HashAlgorithm, HashAlgorithmASN1, HashBlockSize, HashDigestSize, …
Data RIPEMD160Defined in cryptonite-0.30 · Crypto.Hash.RIPEMD160Show RIPEMD160Defined in cryptonite-0.30 · Crypto.Hash.RIPEMD160HashAlgorithm RIPEMD160Defined in cryptonite-0.30 · Crypto.Hash.RIPEMD160HashAlgorithmASN1 RIPEMD160Defined in cryptonite-0.30 · Crypto.PubKey.RSA.PKCS15type HashBlockSize RIPEMD160 =Defined in cryptonite-0.30 · Crypto.Hash.RIPEMD16064
type HashDigestSize RIPEMD160 =Defined in cryptonite-0.30 · Crypto.Hash.RIPEMD16020
type HashInternalContextSize RIPEMD160 =Defined in cryptonite-0.30 · Crypto.Hash.RIPEMD160128
SHA1 cryptographic hash algorithm
Instances8Data, Show, HashAlgorithm, HashAlgorithmPrefix, HashAlgorithmASN1, HashBlockSize, …
Data SHA1Defined in cryptonite-0.30 · Crypto.Hash.SHA1Show SHA1Defined in cryptonite-0.30 · Crypto.Hash.SHA1HashAlgorithm SHA1Defined in cryptonite-0.30 · Crypto.Hash.SHA1HashAlgorithmPrefix SHA1Defined in cryptonite-0.30 · Crypto.Hash.SHA1HashAlgorithmASN1 SHA1Defined in cryptonite-0.30 · Crypto.PubKey.RSA.PKCS15type HashBlockSize SHA1 =Defined in cryptonite-0.30 · Crypto.Hash.SHA164
type HashDigestSize SHA1 =Defined in cryptonite-0.30 · Crypto.Hash.SHA120
type HashInternalContextSize SHA1 =Defined in cryptonite-0.30 · Crypto.Hash.SHA196
SHA224 cryptographic hash algorithm
Instances8Data, Show, HashAlgorithm, HashAlgorithmPrefix, HashAlgorithmASN1, HashBlockSize, …
Data SHA224Defined in cryptonite-0.30 · Crypto.Hash.SHA224Show SHA224Defined in cryptonite-0.30 · Crypto.Hash.SHA224HashAlgorithm SHA224Defined in cryptonite-0.30 · Crypto.Hash.SHA224HashAlgorithmPrefix SHA224Defined in cryptonite-0.30 · Crypto.Hash.SHA224HashAlgorithmASN1 SHA224Defined in cryptonite-0.30 · Crypto.PubKey.RSA.PKCS15type HashBlockSize SHA224 =Defined in cryptonite-0.30 · Crypto.Hash.SHA22464
type HashDigestSize SHA224 =Defined in cryptonite-0.30 · Crypto.Hash.SHA22428
type HashInternalContextSize SHA224 =Defined in cryptonite-0.30 · Crypto.Hash.SHA224192
SHA256 cryptographic hash algorithm
Instances8Data, Show, HashAlgorithm, HashAlgorithmPrefix, HashAlgorithmASN1, HashBlockSize, …
Data SHA256Defined in cryptonite-0.30 · Crypto.Hash.SHA256Show SHA256Defined in cryptonite-0.30 · Crypto.Hash.SHA256HashAlgorithm SHA256Defined in cryptonite-0.30 · Crypto.Hash.SHA256HashAlgorithmPrefix SHA256Defined in cryptonite-0.30 · Crypto.Hash.SHA256HashAlgorithmASN1 SHA256Defined in cryptonite-0.30 · Crypto.PubKey.RSA.PKCS15type HashBlockSize SHA256 =Defined in cryptonite-0.30 · Crypto.Hash.SHA25664
type HashDigestSize SHA256 =Defined in cryptonite-0.30 · Crypto.Hash.SHA25632
type HashInternalContextSize SHA256 =Defined in cryptonite-0.30 · Crypto.Hash.SHA256192
SHA3 (224 bits) cryptographic hash algorithm
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
Data SHA3_224Defined in cryptonite-0.30 · Crypto.Hash.SHA3Show SHA3_224Defined in cryptonite-0.30 · Crypto.Hash.SHA3HashAlgorithm SHA3_224Defined in cryptonite-0.30 · Crypto.Hash.SHA3type HashBlockSize SHA3_224 =Defined in cryptonite-0.30 · Crypto.Hash.SHA3144
type HashDigestSize SHA3_224 =Defined in cryptonite-0.30 · Crypto.Hash.SHA328
type HashInternalContextSize SHA3_224 =Defined in cryptonite-0.30 · Crypto.Hash.SHA3352
SHA3 (256 bits) cryptographic hash algorithm
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
Data SHA3_256Defined in cryptonite-0.30 · Crypto.Hash.SHA3Show SHA3_256Defined in cryptonite-0.30 · Crypto.Hash.SHA3HashAlgorithm SHA3_256Defined in cryptonite-0.30 · Crypto.Hash.SHA3type HashBlockSize SHA3_256 =Defined in cryptonite-0.30 · Crypto.Hash.SHA3136
type HashDigestSize SHA3_256 =Defined in cryptonite-0.30 · Crypto.Hash.SHA332
type HashInternalContextSize SHA3_256 =Defined in cryptonite-0.30 · Crypto.Hash.SHA3344
SHA3 (384 bits) cryptographic hash algorithm
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
Data SHA3_384Defined in cryptonite-0.30 · Crypto.Hash.SHA3Show SHA3_384Defined in cryptonite-0.30 · Crypto.Hash.SHA3HashAlgorithm SHA3_384Defined in cryptonite-0.30 · Crypto.Hash.SHA3type HashBlockSize SHA3_384 =Defined in cryptonite-0.30 · Crypto.Hash.SHA3104
type HashDigestSize SHA3_384 =Defined in cryptonite-0.30 · Crypto.Hash.SHA348
type HashInternalContextSize SHA3_384 =Defined in cryptonite-0.30 · Crypto.Hash.SHA3312
SHA3 (512 bits) cryptographic hash algorithm
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
Data SHA3_512Defined in cryptonite-0.30 · Crypto.Hash.SHA3Show SHA3_512Defined in cryptonite-0.30 · Crypto.Hash.SHA3HashAlgorithm SHA3_512Defined in cryptonite-0.30 · Crypto.Hash.SHA3type HashBlockSize SHA3_512 =Defined in cryptonite-0.30 · Crypto.Hash.SHA372
type HashDigestSize SHA3_512 =Defined in cryptonite-0.30 · Crypto.Hash.SHA364
type HashInternalContextSize SHA3_512 =Defined in cryptonite-0.30 · Crypto.Hash.SHA3280
SHA384 cryptographic hash algorithm
Instances8Data, Show, HashAlgorithm, HashAlgorithmPrefix, HashAlgorithmASN1, HashBlockSize, …
Data SHA384Defined in cryptonite-0.30 · Crypto.Hash.SHA384Show SHA384Defined in cryptonite-0.30 · Crypto.Hash.SHA384HashAlgorithm SHA384Defined in cryptonite-0.30 · Crypto.Hash.SHA384HashAlgorithmPrefix SHA384Defined in cryptonite-0.30 · Crypto.Hash.SHA384HashAlgorithmASN1 SHA384Defined in cryptonite-0.30 · Crypto.PubKey.RSA.PKCS15type HashBlockSize SHA384 =Defined in cryptonite-0.30 · Crypto.Hash.SHA384128
type HashDigestSize SHA384 =Defined in cryptonite-0.30 · Crypto.Hash.SHA38448
type HashInternalContextSize SHA384 =Defined in cryptonite-0.30 · Crypto.Hash.SHA384256
SHA512 cryptographic hash algorithm
Instances8Data, Show, HashAlgorithm, HashAlgorithmPrefix, HashAlgorithmASN1, HashBlockSize, …
Data SHA512Defined in cryptonite-0.30 · Crypto.Hash.SHA512Show SHA512Defined in cryptonite-0.30 · Crypto.Hash.SHA512HashAlgorithm SHA512Defined in cryptonite-0.30 · Crypto.Hash.SHA512HashAlgorithmPrefix SHA512Defined in cryptonite-0.30 · Crypto.Hash.SHA512HashAlgorithmASN1 SHA512Defined in cryptonite-0.30 · Crypto.PubKey.RSA.PKCS15type HashBlockSize SHA512 =Defined in cryptonite-0.30 · Crypto.Hash.SHA512128
type HashDigestSize SHA512 =Defined in cryptonite-0.30 · Crypto.Hash.SHA51264
type HashInternalContextSize SHA512 =Defined in cryptonite-0.30 · Crypto.Hash.SHA512256
SHA512t (224 bits) cryptographic hash algorithm
Instances7Data, Show, HashAlgorithm, HashAlgorithmASN1, HashBlockSize, HashDigestSize, …
Data SHA512t_224Defined in cryptonite-0.30 · Crypto.Hash.SHA512tShow SHA512t_224Defined in cryptonite-0.30 · Crypto.Hash.SHA512tHashAlgorithm SHA512t_224Defined in cryptonite-0.30 · Crypto.Hash.SHA512tHashAlgorithmASN1 SHA512t_224Defined in cryptonite-0.30 · Crypto.PubKey.RSA.PKCS15type HashBlockSize SHA512t_224 =Defined in cryptonite-0.30 · Crypto.Hash.SHA512t128
type HashDigestSize SHA512t_224 =Defined in cryptonite-0.30 · Crypto.Hash.SHA512t28
type HashInternalContextSize SHA512t_224 =Defined in cryptonite-0.30 · Crypto.Hash.SHA512t256
SHA512t (256 bits) cryptographic hash algorithm
Instances7Data, Show, HashAlgorithm, HashAlgorithmASN1, HashBlockSize, HashDigestSize, …
Data SHA512t_256Defined in cryptonite-0.30 · Crypto.Hash.SHA512tShow SHA512t_256Defined in cryptonite-0.30 · Crypto.Hash.SHA512tHashAlgorithm SHA512t_256Defined in cryptonite-0.30 · Crypto.Hash.SHA512tHashAlgorithmASN1 SHA512t_256Defined in cryptonite-0.30 · Crypto.PubKey.RSA.PKCS15type HashBlockSize SHA512t_256 =Defined in cryptonite-0.30 · Crypto.Hash.SHA512t128
type HashDigestSize SHA512t_256 =Defined in cryptonite-0.30 · Crypto.Hash.SHA512t32
type HashInternalContextSize SHA512t_256 =Defined in cryptonite-0.30 · Crypto.Hash.SHA512t256
Instances7Data, Show, HashAlgorithm, HashSHAKE, HashBlockSize, HashDigestSize, …
KnownNat bitlen => Data (SHAKE128 bitlen)Defined in cryptonite-0.30 · Crypto.Hash.SHAKEShow (SHAKE128 bitlen)Defined in cryptonite-0.30 · Crypto.Hash.SHAKEKnownNat bitlen => HashAlgorithm (SHAKE128 bitlen)Defined in cryptonite-0.30 · Crypto.Hash.SHAKEKnownNat bitlen => HashSHAKE (SHAKE128 bitlen)Defined in cryptonite-0.30 · Crypto.Hash.SHAKEtype HashBlockSize (SHAKE128 bitlen) =Defined in cryptonite-0.30 · Crypto.Hash.SHAKE168
type HashDigestSize (SHAKE128 bitlen) = Div8 (bitlen +Defined in cryptonite-0.30 · Crypto.Hash.SHAKE7
)type HashInternalContextSize (SHAKE128 bitlen) =Defined in cryptonite-0.30 · Crypto.Hash.SHAKE376
Instances7Data, Show, HashAlgorithm, HashSHAKE, HashBlockSize, HashDigestSize, …
KnownNat bitlen => Data (SHAKE256 bitlen)Defined in cryptonite-0.30 · Crypto.Hash.SHAKEShow (SHAKE256 bitlen)Defined in cryptonite-0.30 · Crypto.Hash.SHAKEKnownNat bitlen => HashAlgorithm (SHAKE256 bitlen)Defined in cryptonite-0.30 · Crypto.Hash.SHAKEKnownNat bitlen => HashSHAKE (SHAKE256 bitlen)Defined in cryptonite-0.30 · Crypto.Hash.SHAKEtype HashBlockSize (SHAKE256 bitlen) =Defined in cryptonite-0.30 · Crypto.Hash.SHAKE136
type HashDigestSize (SHAKE256 bitlen) = Div8 (bitlen +Defined in cryptonite-0.30 · Crypto.Hash.SHAKE7
)type HashInternalContextSize (SHAKE256 bitlen) =Defined in cryptonite-0.30 · Crypto.Hash.SHAKE344
Skein256 (224 bits) cryptographic hash algorithm
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
Data Skein256_224Defined in cryptonite-0.30 · Crypto.Hash.Skein256Show Skein256_224Defined in cryptonite-0.30 · Crypto.Hash.Skein256HashAlgorithm Skein256_224Defined in cryptonite-0.30 · Crypto.Hash.Skein256type HashBlockSize Skein256_224 =Defined in cryptonite-0.30 · Crypto.Hash.Skein25632
type HashDigestSize Skein256_224 =Defined in cryptonite-0.30 · Crypto.Hash.Skein25628
type HashInternalContextSize Skein256_224 =Defined in cryptonite-0.30 · Crypto.Hash.Skein25696
Skein256 (256 bits) cryptographic hash algorithm
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
Data Skein256_256Defined in cryptonite-0.30 · Crypto.Hash.Skein256Show Skein256_256Defined in cryptonite-0.30 · Crypto.Hash.Skein256HashAlgorithm Skein256_256Defined in cryptonite-0.30 · Crypto.Hash.Skein256type HashBlockSize Skein256_256 =Defined in cryptonite-0.30 · Crypto.Hash.Skein25632
type HashDigestSize Skein256_256 =Defined in cryptonite-0.30 · Crypto.Hash.Skein25632
type HashInternalContextSize Skein256_256 =Defined in cryptonite-0.30 · Crypto.Hash.Skein25696
Skein512 (224 bits) cryptographic hash algorithm
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
Data Skein512_224Defined in cryptonite-0.30 · Crypto.Hash.Skein512Show Skein512_224Defined in cryptonite-0.30 · Crypto.Hash.Skein512HashAlgorithm Skein512_224Defined in cryptonite-0.30 · Crypto.Hash.Skein512type HashBlockSize Skein512_224 =Defined in cryptonite-0.30 · Crypto.Hash.Skein51264
type HashDigestSize Skein512_224 =Defined in cryptonite-0.30 · Crypto.Hash.Skein51228
type HashInternalContextSize Skein512_224 =Defined in cryptonite-0.30 · Crypto.Hash.Skein512160
Skein512 (256 bits) cryptographic hash algorithm
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
Data Skein512_256Defined in cryptonite-0.30 · Crypto.Hash.Skein512Show Skein512_256Defined in cryptonite-0.30 · Crypto.Hash.Skein512HashAlgorithm Skein512_256Defined in cryptonite-0.30 · Crypto.Hash.Skein512type HashBlockSize Skein512_256 =Defined in cryptonite-0.30 · Crypto.Hash.Skein51264
type HashDigestSize Skein512_256 =Defined in cryptonite-0.30 · Crypto.Hash.Skein51232
type HashInternalContextSize Skein512_256 =Defined in cryptonite-0.30 · Crypto.Hash.Skein512160
Skein512 (384 bits) cryptographic hash algorithm
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
Data Skein512_384Defined in cryptonite-0.30 · Crypto.Hash.Skein512Show Skein512_384Defined in cryptonite-0.30 · Crypto.Hash.Skein512HashAlgorithm Skein512_384Defined in cryptonite-0.30 · Crypto.Hash.Skein512type HashBlockSize Skein512_384 =Defined in cryptonite-0.30 · Crypto.Hash.Skein51264
type HashDigestSize Skein512_384 =Defined in cryptonite-0.30 · Crypto.Hash.Skein51248
type HashInternalContextSize Skein512_384 =Defined in cryptonite-0.30 · Crypto.Hash.Skein512160
Skein512 (512 bits) cryptographic hash algorithm
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
Data Skein512_512Defined in cryptonite-0.30 · Crypto.Hash.Skein512Show Skein512_512Defined in cryptonite-0.30 · Crypto.Hash.Skein512HashAlgorithm Skein512_512Defined in cryptonite-0.30 · Crypto.Hash.Skein512type HashBlockSize Skein512_512 =Defined in cryptonite-0.30 · Crypto.Hash.Skein51264
type HashDigestSize Skein512_512 =Defined in cryptonite-0.30 · Crypto.Hash.Skein51264
type HashInternalContextSize Skein512_512 =Defined in cryptonite-0.30 · Crypto.Hash.Skein512160
Tiger cryptographic hash algorithm
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
Data TigerDefined in cryptonite-0.30 · Crypto.Hash.TigerShow TigerDefined in cryptonite-0.30 · Crypto.Hash.TigerHashAlgorithm TigerDefined in cryptonite-0.30 · Crypto.Hash.Tigertype HashBlockSize Tiger =Defined in cryptonite-0.30 · Crypto.Hash.Tiger64
type HashDigestSize Tiger =Defined in cryptonite-0.30 · Crypto.Hash.Tiger24
type HashInternalContextSize Tiger =Defined in cryptonite-0.30 · Crypto.Hash.Tiger96
Represent a context for a given hash algorithm.
This type is an instance of ByteArrayAccess for debugging purpose. Internal layout is architecture dependent, may contain uninitialized data fragments, and change in future versions. The bytearray should not be used as input to cryptographic algorithms.
Instances2NFData, ByteArrayAccess
NFData (Context a)Defined in cryptonite-0.30 · Crypto.Hash.TypesByteArrayAccess (Context a)Defined in cryptonite-0.30 · Crypto.Hash.Types
Represent a digest for a given hash algorithm.
This type is an instance of ByteArrayAccess from package memory. Module Data.ByteArray provides many primitives to work with those values including conversion to other types.
Creating a digest from a bytearray is also possible with function
digestFromByteString.
Instances7Eq, Data, Ord, Read, Show, NFData, …
Eq (Digest a)Defined in cryptonite-0.30 · Crypto.Hash.TypesData a => Data (Digest a)Defined in cryptonite-0.30 · Crypto.Hash.TypesOrd (Digest a)Defined in cryptonite-0.30 · Crypto.Hash.TypesHashAlgorithm a => Read (Digest a)Defined in cryptonite-0.30 · Crypto.Hash.TypesShow (Digest a)Defined in cryptonite-0.30 · Crypto.Hash.TypesNFData (Digest a)Defined in cryptonite-0.30 · Crypto.Hash.TypesByteArrayAccess (Digest a)Defined in cryptonite-0.30 · Crypto.Hash.Types
Class representing hashing algorithms.
The interface presented here is update in place and lowlevel. the Hash module takes care of hidding the mutable interface properly.
Methods
hashBlockSize :: a -> IntGet the block size of a hash algorithm
hashDigestSize :: a -> IntGet the digest size of a hash algorithm
Instances44HashAlgorithm, …
HashAlgorithm Blake2b_160Defined in cryptonite-0.30 · Crypto.Hash.Blake2bHashAlgorithm Blake2b_224Defined in cryptonite-0.30 · Crypto.Hash.Blake2bHashAlgorithm Blake2b_256Defined in cryptonite-0.30 · Crypto.Hash.Blake2bHashAlgorithm Blake2b_384Defined in cryptonite-0.30 · Crypto.Hash.Blake2bHashAlgorithm Blake2b_512Defined in cryptonite-0.30 · Crypto.Hash.Blake2bHashAlgorithm Blake2bp_512Defined in cryptonite-0.30 · Crypto.Hash.Blake2bpHashAlgorithm Blake2s_160Defined in cryptonite-0.30 · Crypto.Hash.Blake2sHashAlgorithm Blake2s_224Defined in cryptonite-0.30 · Crypto.Hash.Blake2sHashAlgorithm Blake2s_256Defined in cryptonite-0.30 · Crypto.Hash.Blake2sHashAlgorithm Blake2sp_224Defined in cryptonite-0.30 · Crypto.Hash.Blake2spHashAlgorithm Blake2sp_256Defined in cryptonite-0.30 · Crypto.Hash.Blake2spHashAlgorithm Keccak_224Defined in cryptonite-0.30 · Crypto.Hash.KeccakHashAlgorithm Keccak_256Defined in cryptonite-0.30 · Crypto.Hash.KeccakHashAlgorithm Keccak_384Defined in cryptonite-0.30 · Crypto.Hash.KeccakHashAlgorithm Keccak_512Defined in cryptonite-0.30 · Crypto.Hash.KeccakHashAlgorithm MD2Defined in cryptonite-0.30 · Crypto.Hash.MD2HashAlgorithm MD4Defined in cryptonite-0.30 · Crypto.Hash.MD4HashAlgorithm MD5Defined in cryptonite-0.30 · Crypto.Hash.MD5HashAlgorithm RIPEMD160Defined in cryptonite-0.30 · Crypto.Hash.RIPEMD160HashAlgorithm SHA1Defined in cryptonite-0.30 · Crypto.Hash.SHA1HashAlgorithm SHA224Defined in cryptonite-0.30 · Crypto.Hash.SHA224HashAlgorithm SHA256Defined in cryptonite-0.30 · Crypto.Hash.SHA256HashAlgorithm SHA3_224Defined in cryptonite-0.30 · Crypto.Hash.SHA3HashAlgorithm SHA3_256Defined in cryptonite-0.30 · Crypto.Hash.SHA3HashAlgorithm SHA3_384Defined in cryptonite-0.30 · Crypto.Hash.SHA3HashAlgorithm SHA3_512Defined in cryptonite-0.30 · Crypto.Hash.SHA3HashAlgorithm SHA384Defined in cryptonite-0.30 · Crypto.Hash.SHA384HashAlgorithm SHA512Defined in cryptonite-0.30 · Crypto.Hash.SHA512HashAlgorithm SHA512t_224Defined in cryptonite-0.30 · Crypto.Hash.SHA512tHashAlgorithm SHA512t_256Defined in cryptonite-0.30 · Crypto.Hash.SHA512tHashAlgorithm Skein256_224Defined in cryptonite-0.30 · Crypto.Hash.Skein256HashAlgorithm Skein256_256Defined in cryptonite-0.30 · Crypto.Hash.Skein256HashAlgorithm Skein512_224Defined in cryptonite-0.30 · Crypto.Hash.Skein512HashAlgorithm Skein512_256Defined in cryptonite-0.30 · Crypto.Hash.Skein512HashAlgorithm Skein512_384Defined in cryptonite-0.30 · Crypto.Hash.Skein512HashAlgorithm Skein512_512Defined in cryptonite-0.30 · Crypto.Hash.Skein512HashAlgorithm TigerDefined in cryptonite-0.30 · Crypto.Hash.TigerHashAlgorithm WhirlpoolDefined in cryptonite-0.30 · Crypto.Hash.WhirlpoolKnownNat bitlen => HashAlgorithm (SHAKE128 bitlen)Defined in cryptonite-0.30 · Crypto.Hash.SHAKEKnownNat bitlen => HashAlgorithm (SHAKE256 bitlen)Defined in cryptonite-0.30 · Crypto.Hash.SHAKE(IsDivisibleBy8 bitlen, KnownNat bitlen, IsAtLeast bitlenDefined in cryptonite-0.30 · Crypto.Hash.Blake28
, IsAtMost bitlen256
) => HashAlgorithm (Blake2s bitlen)(IsDivisibleBy8 bitlen, KnownNat bitlen, IsAtLeast bitlenDefined in cryptonite-0.30 · Crypto.Hash.Blake28
, IsAtMost bitlen256
) => HashAlgorithm (Blake2sp bitlen)(IsDivisibleBy8 bitlen, KnownNat bitlen, IsAtLeast bitlenDefined in cryptonite-0.30 · Crypto.Hash.Blake28
, IsAtMost bitlen512
) => HashAlgorithm (Blake2b bitlen)(IsDivisibleBy8 bitlen, KnownNat bitlen, IsAtLeast bitlenDefined in cryptonite-0.30 · Crypto.Hash.Blake28
, IsAtMost bitlen512
) => HashAlgorithm (Blake2bp bitlen)
Hashing algorithms with a constant-time implementation.
Instances6HashAlgorithmPrefix
HashAlgorithmPrefix MD5Defined in cryptonite-0.30 · Crypto.Hash.MD5HashAlgorithmPrefix SHA1Defined in cryptonite-0.30 · Crypto.Hash.SHA1HashAlgorithmPrefix SHA224Defined in cryptonite-0.30 · Crypto.Hash.SHA224HashAlgorithmPrefix SHA256Defined in cryptonite-0.30 · Crypto.Hash.SHA256HashAlgorithmPrefix SHA384Defined in cryptonite-0.30 · Crypto.Hash.SHA384HashAlgorithmPrefix SHA512Defined in cryptonite-0.30 · Crypto.Hash.SHA512
Whirlpool cryptographic hash algorithm
Instances6Data, Show, HashAlgorithm, HashBlockSize, HashDigestSize, HashInternalContextSize
Data WhirlpoolDefined in cryptonite-0.30 · Crypto.Hash.WhirlpoolShow WhirlpoolDefined in cryptonite-0.30 · Crypto.Hash.WhirlpoolHashAlgorithm WhirlpoolDefined in cryptonite-0.30 · Crypto.Hash.Whirlpooltype HashBlockSize Whirlpool =Defined in cryptonite-0.30 · Crypto.Hash.Whirlpool64
type HashDigestSize Whirlpool =Defined in cryptonite-0.30 · Crypto.Hash.Whirlpool64
type HashInternalContextSize Whirlpool =Defined in cryptonite-0.30 · Crypto.Hash.Whirlpool168
JWK Set
3 declarationsInstances5Eq, Show, FromJSON, ToJSON, VerificationKeyStore
Eq JWKSetDefined in jose-0.10.0.1 · Crypto.JOSE.JWKShow JWKSetDefined in jose-0.10.0.1 · Crypto.JOSE.JWKFromJSON JWKSetDefined in jose-0.10.0.1 · Crypto.JOSE.JWKToJSON JWKSetDefined in jose-0.10.0.1 · Crypto.JOSE.JWKApplicative m => VerificationKeyStore m h s JWKSetDefined in jose-0.10.0.1 · Crypto.JOSE.JWK.StoreUse a JWKSet as a VerificationKeyStore. Can be used with any payload type. Returns all keys in the set; header and payload are ignored. No filtering is performed.
Sanity-check a JWK.
Return an appropriate error if the key is size is too small to be used with any JOSE algorithm, or for other problems that mean the key cannot be used.
Choose the cryptographically strongest JWS algorithm for a given key. The JWK "alg" algorithm parameter is ignored.
module Crypto.JOSE.JWA.JWK