hash

package
v3.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hasher

type Hasher struct {
	// contains filtered or unexported fields
}

func FromHandle

func FromHandle(handle unsafe.Pointer) Hasher

func NewBlake2sHasher

func NewBlake2sHasher(inputChunkSize uint64) (Hasher, runtime.EIcicleError)

func NewBlake3Hasher added in v3.4.0

func NewBlake3Hasher(inputChunkSize uint64) (Hasher, runtime.EIcicleError)

func NewKeccak256Hasher

func NewKeccak256Hasher(inputChunkSize uint64) (Hasher, runtime.EIcicleError)

func NewKeccak512Hasher

func NewKeccak512Hasher(inputChunkSize uint64) (Hasher, runtime.EIcicleError)

func NewSha3256Hasher

func NewSha3256Hasher(inputChunkSize uint64) (Hasher, runtime.EIcicleError)

func NewSha3512Hasher

func NewSha3512Hasher(inputChunkSize uint64) (Hasher, runtime.EIcicleError)

func (*Hasher) Delete

func (h *Hasher) Delete() runtime.EIcicleError

func (*Hasher) GetHandle

func (h *Hasher) GetHandle() HasherHandle

func (*Hasher) Hash

func (h *Hasher) Hash(input, output core.HostOrDeviceSlice, cfg core.HashConfig) runtime.EIcicleError

Hash computes the hash of the input data using the specified configuration and stores the result in the output slice.

Parameters:

  • input: The input data to be hashed; assumed to be in bytes.
  • output: The output slice to store the computed hash; assumed to be in bytes.
  • cfg: The configuration options for the hashing operation.

Returns:

  • An error if the hashing operation fails, otherwise runtime.Success.

func (*Hasher) OutputSize

func (h *Hasher) OutputSize() uint64

type HasherHandle

type HasherHandle = *C.struct_Hash

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL