gini-crypto-0.1.0.0

Safe HaskellNone
LanguageHaskell2010

Gini.Crypto.Hash

Synopsis

Documentation

newtype BlockHash #

Constructors

BlockHash 

Fields

Instances
Eq BlockHash # 
Instance details

Defined in Gini.Crypto.Hash

Show BlockHash # 
Instance details

Defined in Gini.Crypto.Hash

NFData BlockHash # 
Instance details

Defined in Gini.Crypto.Hash

Methods

rnf :: BlockHash -> () #

ByteArrayAccess BlockHash # 
Instance details

Defined in Gini.Crypto.Hash

Methods

length :: BlockHash -> Int #

withByteArray :: BlockHash -> (Ptr p -> IO a) -> IO a #

copyByteArrayToPtr :: BlockHash -> Ptr p -> IO () #

Display BlockHash # 
Instance details

Defined in Gini.Crypto.Hash

Methods

display :: BlockHash -> Utf8Builder

textDisplay :: BlockHash -> Text

Persist BlockHash # 
Instance details

Defined in Gini.Crypto.Hash

Methods

put :: BlockHash -> Put ()

get :: Get BlockHash

Validity BlockHash # 
Instance details

Defined in Gini.Crypto.Hash

Methods

validate :: BlockHash -> Validation

PersistField BlockHash # 
Instance details

Defined in Gini.Crypto.Hash

Methods

toPersistValue :: BlockHash -> PersistValue

fromPersistValue :: PersistValue -> Either Text BlockHash

PersistFieldSql BlockHash # 
Instance details

Defined in Gini.Crypto.Hash

Methods

sqlType :: Proxy BlockHash -> SqlType

blockHashSize :: Int #

Expected length of a block digest

computeBlockHash :: ByteArrayAccess a => a -> BlockHash #

Compute the hash digest of a block.

buildBlockHash :: ByteArrayAccess a => a -> Maybe BlockHash #

Create BlockHash from a sequence of bytes

mkBlockHashHexQ :: String -> Q Exp #

Block hash from hex encoded string.

newtype POWHash #

Constructors

POWHash 

Fields

Instances
Eq POWHash # 
Instance details

Defined in Gini.Crypto.Hash

Methods

(==) :: POWHash -> POWHash -> Bool #

(/=) :: POWHash -> POWHash -> Bool #

Show POWHash # 
Instance details

Defined in Gini.Crypto.Hash

NFData POWHash # 
Instance details

Defined in Gini.Crypto.Hash

Methods

rnf :: POWHash -> () #

ByteArrayAccess POWHash # 
Instance details

Defined in Gini.Crypto.Hash

Methods

length :: POWHash -> Int #

withByteArray :: POWHash -> (Ptr p -> IO a) -> IO a #

copyByteArrayToPtr :: POWHash -> Ptr p -> IO () #

Display POWHash # 
Instance details

Defined in Gini.Crypto.Hash

Methods

display :: POWHash -> Utf8Builder

textDisplay :: POWHash -> Text

Persist POWHash # 
Instance details

Defined in Gini.Crypto.Hash

Methods

put :: POWHash -> Put ()

get :: Get POWHash

Validity POWHash # 
Instance details

Defined in Gini.Crypto.Hash

Methods

validate :: POWHash -> Validation

powHashSize :: Int #

Expected length of a block digest in bytes

computePOWHash :: ByteArrayAccess a => a -> POWHash #

Compute the hash digest of a block.

buildPOWHash :: ByteArrayAccess a => a -> Maybe POWHash #

Create POWHash from a sequence of bytes