hash

package
v0.1.1-2 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2021 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hash

type Hash string

Hash is a hashed entity. This could be an address, localpart, organisation part or anything else. Currently only sha256 is supported

func New

func New(s string) Hash

New generates a regular hash. Assumes you know what you are hashing

func NewFromHash

func NewFromHash(hash string) (*Hash, error)

NewFromHash generates a hash address based on the given string hash

func (Hash) Byte

func (ha Hash) Byte() []byte

Byte casts an hash address to string

func (Hash) IsEmpty

func (ha Hash) IsEmpty() bool

IsEmpty returns true when this hash is of an empty string

func (Hash) String

func (ha Hash) String() string

String casts an hash address to string

func (Hash) Verify

func (ha Hash) Verify(localHash, orgHash Hash) bool

Verify will check if the hashes for local and org found matches the actual target hash

Jump to

Keyboard shortcuts

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