hashes-0.3.0: Hash functions
CopyrightCopyright © 2021-2024 Lars Kuhtz <lakuhtz@gmail.com>
LicenseMIT
MaintainerLars Kuhtz <lakuhtz@gmail.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Data.Hash.Internal.OpenSSL

Description

Bindings for OpenSSL EVP Message Digest Routines.

Requires OpenSSL version >= 1.1.0

Synopsis

EVP digest routines

newtype Algorithm a Source #

An algorithm implementation from an OpenSSL algorithm provider.

It must be freed after use. Internally, implementations are cached and reference counted. Re-initialization after the last reference is freed is somewhat expensive.

It is assumed that this always points to a valid algorithm implementation.

Constructors

Algorithm (ForeignPtr Void) 

Instances

Instances details
Typeable a => Show (Algorithm a) Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

newtype Ctx a Source #

OpenSSL Message Digest Context

Constructors

Ctx (ForeignPtr Void) 

newtype Digest a Source #

Generic OpenSSL message digest type.

This can be used with DerivingVia to derive hash instances for concrete message digest algorithms.

Constructors

Digest ShortByteString 

Instances

Instances details
IsString (Digest a) Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Methods

fromString :: String -> Digest a #

Show (Digest a) Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Methods

showsPrec :: Int -> Digest a -> ShowS #

show :: Digest a -> String #

showList :: [Digest a] -> ShowS #

Eq (Digest a) Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Methods

(==) :: Digest a -> Digest a -> Bool #

(/=) :: Digest a -> Digest a -> Bool #

Ord (Digest a) Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Methods

compare :: Digest a -> Digest a -> Ordering #

(<) :: Digest a -> Digest a -> Bool #

(<=) :: Digest a -> Digest a -> Bool #

(>) :: Digest a -> Digest a -> Bool #

(>=) :: Digest a -> Digest a -> Bool #

max :: Digest a -> Digest a -> Digest a #

min :: Digest a -> Digest a -> Digest a #

OpenSslDigest a => Hash (Digest a) Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

IncrementalHash (Digest a) Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Associated Types

type Context (Digest a) Source #

Methods

update :: Context (Digest a) -> Ptr Word8 -> Int -> IO () Source #

finalize :: Context (Digest a) -> IO (Digest a) Source #

ResetableHash (Digest a) Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Methods

reset :: Context (Digest a) -> IO () Source #

type Context (Digest a) Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

type Context (Digest a) = Ctx a

resetCtx :: Ctx a -> IO () Source #

Resets a context an initialize context.

initCtx :: Algorithm a -> IO (Ctx a) Source #

Allocates and initializes a new context. The context may be reused by calling resetCtx on it.

updateCtx :: Ctx a -> Ptr Word8 -> Int -> IO () Source #

Feed more data into an context.

finalCtx :: Ctx a -> IO (Digest a) Source #

Finalize a hash and return the digest.

fetchAlgorithm :: String -> IO (Algorithm a) Source #

Look up the Algorithm with given identifier. This is a less efficient legacy way to obtain algorithm implementations. The returned algorithms do not need to be freed.

The result is guaranteed to be a valid algorithm. Otherwise an OpenSslException is thrown.

Algorithms

class OpenSslDigest a where Source #

Instances

Instances details
OpenSslDigest Blake2b512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

OpenSslDigest Blake2s256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

OpenSslDigest Keccak224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

OpenSslDigest Keccak256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

OpenSslDigest Keccak384 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

OpenSslDigest Keccak512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

OpenSslDigest Sha2_224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

OpenSslDigest Sha2_256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

OpenSslDigest Sha2_384 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

OpenSslDigest Sha2_512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

OpenSslDigest Sha2_512_224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

OpenSslDigest Sha2_512_256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

OpenSslDigest Sha3_224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

OpenSslDigest Sha3_256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

OpenSslDigest Sha3_384 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

OpenSslDigest Sha3_512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

OpenSslDigest (Shake128 n) Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

OpenSslDigest (Shake256 n) Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

SHA2

SHA-2 (Secure Hash Algorithm 2) is a family of cryptographic hash functions standardized in NIST FIPS 180-4, first published in 2001. These functions conform to NIST FIPS 180-4.

The following hash functions from the SHA-2 family are supported in openssl-3.0 (cf. https://www.openssl.org/docs/man3.0/man3/EVP_sha224.html)

SHA2-224, SHA2-256, SHA2-512224, SHA2-512256, SHA2-384, SHA2-512

newtype Sha2_224 Source #

Instances

Instances details
IsString Sha2_224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Show Sha2_224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Eq Sha2_224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Ord Sha2_224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Hash Sha2_224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

IncrementalHash Sha2_224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Associated Types

type Context Sha2_224 Source #

ResetableHash Sha2_224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Methods

reset :: Context Sha2_224 -> IO () Source #

OpenSslDigest Sha2_224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

type Context Sha2_224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

newtype Sha2_256 Source #

Instances

Instances details
IsString Sha2_256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Show Sha2_256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Eq Sha2_256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Ord Sha2_256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Hash Sha2_256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

IncrementalHash Sha2_256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Associated Types

type Context Sha2_256 Source #

ResetableHash Sha2_256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Methods

reset :: Context Sha2_256 -> IO () Source #

OpenSslDigest Sha2_256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

type Context Sha2_256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

newtype Sha2_384 Source #

Instances

Instances details
IsString Sha2_384 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Show Sha2_384 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Eq Sha2_384 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Ord Sha2_384 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Hash Sha2_384 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

IncrementalHash Sha2_384 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Associated Types

type Context Sha2_384 Source #

ResetableHash Sha2_384 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Methods

reset :: Context Sha2_384 -> IO () Source #

OpenSslDigest Sha2_384 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

type Context Sha2_384 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

newtype Sha2_512 Source #

Instances

Instances details
IsString Sha2_512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Show Sha2_512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Eq Sha2_512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Ord Sha2_512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Hash Sha2_512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

IncrementalHash Sha2_512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Associated Types

type Context Sha2_512 Source #

ResetableHash Sha2_512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Methods

reset :: Context Sha2_512 -> IO () Source #

OpenSslDigest Sha2_512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

type Context Sha2_512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

newtype Sha2_512_224 Source #

Instances

Instances details
IsString Sha2_512_224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Show Sha2_512_224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Eq Sha2_512_224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Ord Sha2_512_224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Hash Sha2_512_224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

IncrementalHash Sha2_512_224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Associated Types

type Context Sha2_512_224 Source #

ResetableHash Sha2_512_224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

OpenSslDigest Sha2_512_224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

type Context Sha2_512_224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

newtype Sha2_512_256 Source #

Instances

Instances details
IsString Sha2_512_256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Show Sha2_512_256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Eq Sha2_512_256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Ord Sha2_512_256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Hash Sha2_512_256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

IncrementalHash Sha2_512_256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Associated Types

type Context Sha2_512_256 Source #

ResetableHash Sha2_512_256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

OpenSslDigest Sha2_512_256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

type Context Sha2_512_256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

SHA3

SHA-3 (Secure Hash Algorithm 3) is a family of cryptographic hash functions standardized in NIST FIPS 202, first published in 2015. It is based on the Keccak algorithm. These functions conform to NIST FIPS 202.

The following hash functions from the SHA-3 family are supported in openssl-3.0 (cf. https://www.openssl.org/docs/man3.0/man3/EVP_sha3_224.html)

SHA3-3_224, SHA3-3_256, SHA3-3_384, SHA3-3_512, SHAKE128, SHAKE256

newtype Sha3_224 Source #

Instances

Instances details
IsString Sha3_224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Show Sha3_224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Eq Sha3_224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Ord Sha3_224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Hash Sha3_224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

IncrementalHash Sha3_224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Associated Types

type Context Sha3_224 Source #

ResetableHash Sha3_224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Methods

reset :: Context Sha3_224 -> IO () Source #

OpenSslDigest Sha3_224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

type Context Sha3_224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

newtype Sha3_256 Source #

Instances

Instances details
IsString Sha3_256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Show Sha3_256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Eq Sha3_256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Ord Sha3_256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Hash Sha3_256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

IncrementalHash Sha3_256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Associated Types

type Context Sha3_256 Source #

ResetableHash Sha3_256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Methods

reset :: Context Sha3_256 -> IO () Source #

OpenSslDigest Sha3_256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

type Context Sha3_256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

newtype Sha3_384 Source #

Instances

Instances details
IsString Sha3_384 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Show Sha3_384 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Eq Sha3_384 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Ord Sha3_384 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Hash Sha3_384 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

IncrementalHash Sha3_384 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Associated Types

type Context Sha3_384 Source #

ResetableHash Sha3_384 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Methods

reset :: Context Sha3_384 -> IO () Source #

OpenSslDigest Sha3_384 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

type Context Sha3_384 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

newtype Sha3_512 Source #

Instances

Instances details
IsString Sha3_512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Show Sha3_512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Eq Sha3_512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Ord Sha3_512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Hash Sha3_512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

IncrementalHash Sha3_512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Associated Types

type Context Sha3_512 Source #

ResetableHash Sha3_512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Methods

reset :: Context Sha3_512 -> IO () Source #

OpenSslDigest Sha3_512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

type Context Sha3_512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

newtype Shake128 (bits :: Natural) Source #

Instances

Instances details
IsString (Shake128 bits) Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Methods

fromString :: String -> Shake128 bits #

Show (Shake128 bits) Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Methods

showsPrec :: Int -> Shake128 bits -> ShowS #

show :: Shake128 bits -> String #

showList :: [Shake128 bits] -> ShowS #

Eq (Shake128 bits) Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Methods

(==) :: Shake128 bits -> Shake128 bits -> Bool #

(/=) :: Shake128 bits -> Shake128 bits -> Bool #

Ord (Shake128 bits) Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Methods

compare :: Shake128 bits -> Shake128 bits -> Ordering #

(<) :: Shake128 bits -> Shake128 bits -> Bool #

(<=) :: Shake128 bits -> Shake128 bits -> Bool #

(>) :: Shake128 bits -> Shake128 bits -> Bool #

(>=) :: Shake128 bits -> Shake128 bits -> Bool #

max :: Shake128 bits -> Shake128 bits -> Shake128 bits #

min :: Shake128 bits -> Shake128 bits -> Shake128 bits #

KnownNat bits => Hash (Shake128 bits) Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Methods

initialize :: IO (Context (Shake128 bits)) Source #

KnownNat bits => IncrementalHash (Shake128 bits) Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Associated Types

type Context (Shake128 bits) Source #

Methods

update :: Context (Shake128 bits) -> Ptr Word8 -> Int -> IO () Source #

finalize :: Context (Shake128 bits) -> IO (Shake128 bits) Source #

KnownNat bits => ResetableHash (Shake128 bits) Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Methods

reset :: Context (Shake128 bits) -> IO () Source #

OpenSslDigest (Shake128 n) Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

type Context (Shake128 bits) Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

type Context (Shake128 bits)

newtype Shake256 (bits :: Natural) Source #

Instances

Instances details
IsString (Shake256 bits) Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Methods

fromString :: String -> Shake256 bits #

Show (Shake256 bits) Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Methods

showsPrec :: Int -> Shake256 bits -> ShowS #

show :: Shake256 bits -> String #

showList :: [Shake256 bits] -> ShowS #

Eq (Shake256 bits) Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Methods

(==) :: Shake256 bits -> Shake256 bits -> Bool #

(/=) :: Shake256 bits -> Shake256 bits -> Bool #

Ord (Shake256 bits) Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Methods

compare :: Shake256 bits -> Shake256 bits -> Ordering #

(<) :: Shake256 bits -> Shake256 bits -> Bool #

(<=) :: Shake256 bits -> Shake256 bits -> Bool #

(>) :: Shake256 bits -> Shake256 bits -> Bool #

(>=) :: Shake256 bits -> Shake256 bits -> Bool #

max :: Shake256 bits -> Shake256 bits -> Shake256 bits #

min :: Shake256 bits -> Shake256 bits -> Shake256 bits #

KnownNat bits => Hash (Shake256 bits) Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Methods

initialize :: IO (Context (Shake256 bits)) Source #

KnownNat bits => IncrementalHash (Shake256 bits) Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Associated Types

type Context (Shake256 bits) Source #

Methods

update :: Context (Shake256 bits) -> Ptr Word8 -> Int -> IO () Source #

finalize :: Context (Shake256 bits) -> IO (Shake256 bits) Source #

KnownNat bits => ResetableHash (Shake256 bits) Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Methods

reset :: Context (Shake256 bits) -> IO () Source #

OpenSslDigest (Shake256 n) Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

type Context (Shake256 bits) Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

type Context (Shake256 bits)

Keccak

This is the latest version of Keccak-256 hash function that was submitted to the SHA3 competition. It is different from the final NIST SHA3 hash.

The difference between NIST SHA3-256 and Keccak-256 is the use of a different padding character for the input message. The former uses '0x06' and the latter uses '0x01'.

This version of Keccak-256 is used by the Ethereum project.

The following hash functions from the SHA-3 family are supported in openssl-3.2 (cf. https://www.openssl.org/docs/man3.2/man7/EVP_MD-KECCAK.html)

KECCAK-224, KECCAK-256, KECCAK-384, KECCAK-512

newtype Keccak224 Source #

Instances

Instances details
IsString Keccak224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Show Keccak224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Eq Keccak224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Ord Keccak224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Hash Keccak224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

IncrementalHash Keccak224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Associated Types

type Context Keccak224 Source #

ResetableHash Keccak224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Methods

reset :: Context Keccak224 -> IO () Source #

OpenSslDigest Keccak224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

type Context Keccak224 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

newtype Keccak256 Source #

Instances

Instances details
IsString Keccak256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Show Keccak256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Eq Keccak256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Ord Keccak256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Hash Keccak256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

IncrementalHash Keccak256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Associated Types

type Context Keccak256 Source #

ResetableHash Keccak256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Methods

reset :: Context Keccak256 -> IO () Source #

OpenSslDigest Keccak256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

type Context Keccak256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

newtype Keccak384 Source #

Instances

Instances details
IsString Keccak384 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Show Keccak384 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Eq Keccak384 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Ord Keccak384 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Hash Keccak384 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

IncrementalHash Keccak384 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Associated Types

type Context Keccak384 Source #

ResetableHash Keccak384 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Methods

reset :: Context Keccak384 -> IO () Source #

OpenSslDigest Keccak384 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

type Context Keccak384 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

newtype Keccak512 Source #

Instances

Instances details
IsString Keccak512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Show Keccak512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Eq Keccak512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Ord Keccak512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Hash Keccak512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

IncrementalHash Keccak512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Associated Types

type Context Keccak512 Source #

ResetableHash Keccak512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Methods

reset :: Context Keccak512 -> IO () Source #

OpenSslDigest Keccak512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

type Context Keccak512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Unsafe finalize functions

finalizeKeccak256Ptr :: Ctx Keccak256 -> Ptr Word8 -> IO () Source #

Low-Level function that writes the final digest directly into the provided pointer. The pointer must point to at least 64 bytes of allocated memory. This is not checked and a violation of this condition may result in a segmentation fault.

finalizeKeccak512Ptr :: Ctx Keccak512 -> Ptr Word8 -> IO () Source #

Low-Level function that writes the final digest directly into the provided pointer. The pointer must point to at least 64 bytes of allocated memory. This is not checked and a violation of this condition may result in a segmentation fault.

Blake2

BLAKE2 is an improved version of BLAKE, which was submitted to the NIST SHA-3 algorithm competition. The BLAKE2s and BLAKE2b algorithms are described in RFC 7693.

The following hash functions from the BLAKE2 family are supported in openssl-3.0 (cf. https://www.openssl.org/docs/man3.0/man3/EVP_blake2b512.html)

BLAKE2B-512, BLACKE2S-256

While the BLAKE2b and BLAKE2s algorithms supports a variable length digest, this implementation outputs a digest of a fixed length (the maximum length supported), which is 512-bits for BLAKE2b and 256-bits for BLAKE2s.

newtype Blake2b512 Source #

Instances

Instances details
IsString Blake2b512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Show Blake2b512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Eq Blake2b512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Ord Blake2b512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Hash Blake2b512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

IncrementalHash Blake2b512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Associated Types

type Context Blake2b512 Source #

OpenSslDigest Blake2b512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

type Context Blake2b512 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

newtype Blake2s256 Source #

Instances

Instances details
IsString Blake2s256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Show Blake2s256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Eq Blake2s256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Ord Blake2s256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Hash Blake2s256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

IncrementalHash Blake2s256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

Associated Types

type Context Blake2s256 Source #

OpenSslDigest Blake2s256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL

type Context Blake2s256 Source # 
Instance details

Defined in Data.Hash.Internal.OpenSSL