Modulecardano-crypto-class-2.5.1.0
Cardano.Crypto.Hash
- 13 types
- 2 classes
- 29 values
- Packagecardano-crypto-class-2.5.1.0
- Exports48
- LicenceApache-2.0
- SourceType.hs
Deprecated. Use bytesToNatural . hashToBytes
Deprecated. Use hashToBytes
Deprecated. Use hashToBytesAsHex
Deprecated. Use hashWith or hashWithSerialiser
Deprecated. Use hashWith
Deprecated. In favor of hashSize
A space-efficient representation of a Word8 vector, supporting many efficient operations.
A ByteString contains 8-bit bytes, or by using the operations from Data.ByteString.Char8 it can be interpreted as containing 8-bit characters.
Instances29IsList, Eq, Data, Ord, Read, Show, …
IsList ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.TypeEq ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.TypeData ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.TypeOrd ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.TypeRead ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.TypeShow ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.TypeIsString ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.TypeBeware: fromString truncates multi-byte characters to octets. e.g. "枯朶に烏のとまりけり秋の暮" becomes �6k�nh~�Q��n�
Semigroup ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.TypeMonoid ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.TypeNFData ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.TypeBinary ByteStringDefined in binary-0.8.9.3 · Data.Binary.ClassHashable ByteStringDefined in hashable-1.5.1.0 · Data.Hashable.ClassInput ByteStringDefined in appar-0.1.8 · Text.Appar.InputSerialise ByteStringDefined in serialise-0.2.6.1 · Codec.Serialise.ClassMemPack ByteStringDefined in mempack-0.2.1.0 · Data.MemPackBuffer ByteStringDefined in mempack-0.2.1.0 · Data.MemPack.BufferNoThunks ByteStringDefined in nothunks-0.3.1 · NoThunks.ClassInstance for string bytestrings
Strict bytestrings shouldn't contain any thunks, but could, due to https://gitlab.haskell.org/ghc/ghc/issues/17290. However, such thunks can't retain any data that they shouldn't, and so it's safe to ignore such thunks.
FromCBOR ByteStringDefined in cardano-binary-1.9.1.0 · Cardano.Binary.FromCBORToCBOR ByteStringDefined in cardano-binary-1.9.1.0 · Cardano.Binary.ToCBORByteArray ByteStringDefined in memory-0.18.0 · Data.ByteArray.TypesByteArrayAccess ByteStringDefined in memory-0.18.0 · Data.ByteArray.TypesHeapWords ByteStringDefined in heapwords-0.1.0.2 · Cardano.HeapWordsSignableRepresentation ByteStringDefined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.UtilLift ByteStringDefined in bytestring-0.12.2.0 · Data.ByteString.Internal.TypeStrict ByteString ByteStringDefined in strict-0.5.1 · Data.Strict.ClassesConvertable Double ByteStringDefined in double-conversion-2.0.5.0 · Data.Double.Conversion.ConvertableConvertable Float ByteStringDefined in double-conversion-2.0.5.0 · Data.Double.Conversion.ConvertableMonad m => Stream ByteString m CharDefined in parsec-3.1.18.0 · Text.Parsec.Primtype Item ByteString = Word8Defined in bytestring-0.12.2.0 · Data.ByteString.Internal.Type
Instances5HashAlgorithm, IncrementalHashAlgorithm, HashSize, SizeHash, HashContext
HashAlgorithm Blake2b_224Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Blake2bIncrementalHashAlgorithm Blake2b_224Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Blake2btype HashSize Blake2b_224 =Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Blake2b28
type SizeHash Blake2b_224 = HashSize Blake2b_224Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Blake2bdata HashContext Blake2b_224Blake2b224Context (PinnedSizedBytes CRYPTO_BLAKE2B_STATE_SIZE)
Instances6HashAlgorithm, IncrementalHashAlgorithm, SodiumHashAlgorithm, HashSize, SizeHash, HashContext
HashAlgorithm Blake2b_256Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Blake2bIncrementalHashAlgorithm Blake2b_256Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Blake2bSodiumHashAlgorithm Blake2b_256Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Libsodium.Hash.Classtype HashSize Blake2b_256 =Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Blake2b32
type SizeHash Blake2b_256 = HashSize Blake2b_256Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Blake2bdata HashContext Blake2b_256Blake2b256Context (PinnedSizedBytes CRYPTO_BLAKE2B_STATE_SIZE)
Instances20Eq, Ord, Read, Show, Generic, Storable, …
HashAlgorithm h => IsString (Q (TExp (Hash h a)))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.ClassEq (Hash h a)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.ClassOrd (Hash h a)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.ClassHashAlgorithm h => Read (Hash h a)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.ClassShow (Hash h a)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.ClassHashAlgorithm h => IsString (Hash h a)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.ClassGeneric (Hash h a)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.ClassHashAlgorithm h => Storable (Hash h a)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.ClassNFData (Hash h a)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.ClassHashAlgorithm h => FromJSON (Hash h a)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.ClassHashAlgorithm h => FromJSONKey (Hash h a)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.ClassHashAlgorithm h => ToJSON (Hash h a)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.ClassHashAlgorithm h => ToJSONKey (Hash h a)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.ClassHashAlgorithm h => MemPack (Hash h a)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.ClassNoThunks (Hash h a)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Class(HashAlgorithm h, Typeable a) => FromCBOR (Hash h a)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Class(HashAlgorithm h, Typeable a) => ToCBOR (Hash h a)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.ClassHeapWords (Hash h a)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.ClassHashAlgorithm h => IsString (Code Q (Hash h a))Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Classtype Rep (Hash h a) = D1 ('MetaDataDefined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Class"Hash"
"Cardano.Crypto.Hash.Class"
"cardano-crypto-class-2.5.1.0-2YbSTqCvsz43JrgaH5m8D0"
'True) (C1 ('MetaCons"UnsafeHashRep"
'PrefixI 'False) (S1 ('MetaSel 'Nothing 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PackedBytes (HashSize h)))))
Methods
hashAlgorithmName :: proxy h -> Stringdigest :: proxy h -> ByteString -> ByteString
Instances10HashAlgorithm, …
HashAlgorithm Blake2b_224Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Blake2bHashAlgorithm Blake2b_256Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Blake2bHashAlgorithm Keccak256Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Keccak256HashAlgorithm NeverHashDefined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.NeverUsedHashAlgorithm RIPEMD160Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.RIPEMD160HashAlgorithm SHA256Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.SHA256HashAlgorithm SHA3_256Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.SHA3_256HashAlgorithm SHA3_512Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.SHA3_512HashAlgorithm SHA512Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.SHA512(KnownNat n, CmpNat nDefined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Short33
~ 'LT) => HashAlgorithm (Blake2bPrefix n)
Instances2HashContext
data HashContext Blake2b_224Blake2b224Context (PinnedSizedBytes CRYPTO_BLAKE2B_STATE_SIZE)
data HashContext Blake2b_256Blake2b256Context (PinnedSizedBytes CRYPTO_BLAKE2B_STATE_SIZE)
Instances10HashSize, …
type HashSize Blake2b_224 =Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Blake2b28
type HashSize Blake2b_256 =Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Blake2b32
type HashSize Keccak256 =Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Keccak25632
type HashSize NeverHash =Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.NeverUsed0
type HashSize RIPEMD160 =Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.RIPEMD16020
type HashSize SHA256 =Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.SHA25632
type HashSize SHA3_256 =Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.SHA3_25632
type HashSize SHA3_512 =Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.SHA3_51264
type HashSize SHA512 =Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.SHA51264
type HashSize (Blake2bPrefix n) = nDefined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Short
Associated types
data family HashContext h s
Methods
hashInit :: MonadST m => m (HashContext h (PrimState m))hashUpdate :: MonadST m => HashContext h (PrimState m) -> ByteString -> m ()hashFinalize :: MonadST m => HashContext h (PrimState m) -> m (Hash h a)
Instances2IncrementalHashAlgorithm
IncrementalHashAlgorithm Blake2b_224Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Blake2bIncrementalHashAlgorithm Blake2b_256Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Blake2b
Deprecated. In favor of HashSize
Instances10SizeHash, …
type SizeHash Blake2b_224 = HashSize Blake2b_224Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Blake2btype SizeHash Blake2b_256 = HashSize Blake2b_256Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Blake2btype SizeHash Keccak256 = HashSize Keccak256Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Keccak256type SizeHash NeverHash = HashSize NeverHashDefined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.NeverUsedtype SizeHash RIPEMD160 = HashSize RIPEMD160Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.RIPEMD160type SizeHash SHA256 = HashSize SHA256Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.SHA256type SizeHash SHA3_256 = HashSize SHA3_256Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.SHA3_256type SizeHash SHA3_512 = HashSize SHA3_512Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.SHA3_512type SizeHash SHA512 = HashSize SHA512Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.SHA512type SizeHash (Blake2bPrefix n) = HashSize (Blake2bPrefix n)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Short
Instances3HashAlgorithm, HashSize, SizeHash
HashAlgorithm Keccak256Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Keccak256type HashSize Keccak256 =Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Keccak25632
type SizeHash Keccak256 = HashSize Keccak256Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Keccak256
Instances3HashAlgorithm, HashSize, SizeHash
HashAlgorithm NeverHashDefined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.NeverUsedtype HashSize NeverHash =Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.NeverUsed0
type SizeHash NeverHash = HashSize NeverHashDefined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.NeverUsed
Instances4HashAlgorithm, SodiumHashAlgorithm, HashSize, SizeHash
HashAlgorithm SHA256Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.SHA256SodiumHashAlgorithm SHA256Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Libsodium.Hash.Classtype HashSize SHA256 =Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.SHA25632
type SizeHash SHA256 = HashSize SHA256Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.SHA256
Instances3HashAlgorithm, HashSize, SizeHash
HashAlgorithm SHA3_256Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.SHA3_256type HashSize SHA3_256 =Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.SHA3_25632
type SizeHash SHA3_256 = HashSize SHA3_256Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.SHA3_256
Instances3HashAlgorithm, HashSize, SizeHash
HashAlgorithm SHA3_512Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.SHA3_512type HashSize SHA3_512 =Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.SHA3_51264
type SizeHash SHA3_512 = HashSize SHA3_512Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.SHA3_512
Instances3HashAlgorithm, HashSize, SizeHash
Instances3HashAlgorithm, HashSize, SizeHash
(KnownNat n, CmpNat nDefined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Short33
~ 'LT) => HashAlgorithm (Blake2bPrefix n)type HashSize (Blake2bPrefix n) = nDefined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Shorttype SizeHash (Blake2bPrefix n) = HashSize (Blake2bPrefix n)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.Hash.Short
Constructors
PackedBytes8 :: !Word64 -> PackedBytes8
PackedBytes28 :: !Word64 -> !Word64 -> !Word64 -> !Word32 -> PackedBytes28
PackedBytes32 :: !Word64 -> !Word64 -> !Word64 -> !Word64 -> PackedBytes32
Instances11Eq, Ord, Show, Storable, NFData, MemPack, …
Eq (PackedBytes n)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.PackedBytes.InternalOrd (PackedBytes n)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.PackedBytes.InternalKnownNat n => Show (PackedBytes n)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.PackedBytes.InternalKnownNat n => Storable (PackedBytes n)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.PackedBytes.InternalNFData (PackedBytes n)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.PackedBytes.InternalKnownNat n => MemPack (PackedBytes n)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.PackedBytes.InternalNoThunks (PackedBytes n)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.PackedBytes.InternalKnownNat n => FromCBOR (PackedBytes n)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.PackedBytes.InternalKnownNat n => ToCBOR (PackedBytes n)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.PackedBytes.InternalKnownNat n => FixedSizeCodec (PackedBytes n)Defined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.PackedBytes.Internaltype FixedSize (PackedBytes n) = nDefined in cardano-crypto-class-2.5.1.0 · Cardano.Crypto.PackedBytes.Internal