Hash

org.sigilaris.core.crypto.Hash
See theHash companion trait
object Hash

Attributes

Companion
trait
Source
Hash.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Hash.type

Members list

Type members

Classlikes

object Value

Attributes

Source
Hash.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Value.type
object ops

Extension methods for hashing.

Extension methods for hashing.

Attributes

Source
Hash.scala
Supertypes
class Object
trait Matchable
class Any
Self type
ops.type

Types

opaque type Value[A]

Opaque type wrapping org.sigilaris.core.datatype.UInt256 to track the source type of the hash.

Opaque type wrapping org.sigilaris.core.datatype.UInt256 to track the source type of the hash.

Type parameters

A

the type that was hashed to produce this value

Attributes

Source
Hash.scala

Value members

Concrete methods

def apply[A : Hash]: Hash[A]

Summons an implicit Hash instance for type A.

Summons an implicit Hash instance for type A.

Type parameters

A

type with an available Hash instance

Attributes

Returns

the Hash instance for A

Source
Hash.scala
def build[A : ByteEncoder]: Hash[A]

Builds a Hash instance for any type with a codec.byte.ByteEncoder.

Builds a Hash instance for any type with a codec.byte.ByteEncoder.

Encodes the value to bytes and computes Keccak-256 hash.

Type parameters

A

type to hash, must have a codec.byte.ByteEncoder

Attributes

Returns

Hash instance using Keccak-256

Source
Hash.scala

Givens

Givens

given contravariant: Contravariant[Hash]

cats.Contravariant instance for Hash.

cats.Contravariant instance for Hash.

Attributes

Source
Hash.scala

Default Hash instance for datatype.Utf8 strings.

Default Hash instance for datatype.Utf8 strings.

Attributes

Source
Hash.scala