eocrypt

package
v0.0.0-...-8e21be9 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const HASH_LEN = 32

Variables

This section is empty.

Functions

This section is empty.

Types

type Hash

type Hash [HASH_LEN]byte

Is only a 32 long byte array, but with some fancy functions.

func HashBytes

func HashBytes(b []byte) *Hash

Hash input bytes and return it as a hash type.

func HashInterface

func HashInterface(val interface{}) *Hash

This function hashes an inputted interface. Returns nil and logs if an error occurs.

func MixHashes

func MixHashes(h1 *Hash, h2 *Hash) *Hash

Mixes two given hashes together, in a very lightweight process.

func (*Hash) BigInt

func (h *Hash) BigInt() *big.Int

Get the Big Int of the bytes of the hash.

func (*Hash) Bytes

func (h *Hash) Bytes() []byte

Get the bytes of the hash.

func (*Hash) Hex

func (h *Hash) Hex() string

Get the string (hex) of the bytes of the hash.

func (*Hash) SetBigInt

func (h *Hash) SetBigInt(i *big.Int)

Set the value of the hash with a Big Int.

func (*Hash) SetBytes

func (h *Hash) SetBytes(b []byte)

Set the value of the hash with bytes.

func (*Hash) SetHex

func (h *Hash) SetHex(s string)

Set the value of the hash with a hex string.

func (*Hash) SetString

func (h *Hash) SetString(s string)

Set the value of the hash with a string.

func (*Hash) String

func (h *Hash) String() string

Get the string of the hash.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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