hash

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: Apache-2.0 Imports: 3 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 interface {
	Hash(string) string
}

Hasher an interface for generating a hash

type Sha256

type Sha256 struct {
}

Sha256 is a Hasher that generates a sha256 hash

func NewSha256

func NewSha256() *Sha256

NewSha256 returns a pointer to a Sha256

func (*Sha256) Hash

func (s *Sha256) Hash(v string) string

Hash takes a string and generates a sha256 checksum from it and returns the base16 formatting of it as a string

Jump to

Keyboard shortcuts

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