Modulecardano-crypto-class-2.5.1.0
Cardano.Crypto.Hash.Class
- 3 types
- 2 classes
- 28 values
- Packagecardano-crypto-class-2.5.1.0
- Exports34
- 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
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)
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
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