hashing

package
v1.30.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2019 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate added in v1.25.0

func Generate(algorithm Algorithm, parameters ...interface{}) ([]byte, error)

Generate - generates the hash using the selected algorithm

func GenerateByteArray

func GenerateByteArray(parameters ...interface{}) ([]byte, error)

GenerateByteArray - generates a new byte array based on the given parameters

func GenerateCRC32

func GenerateCRC32(parameters ...interface{}) ([]byte, error)

GenerateCRC32 - generates a sha256 hash based on the specified parameters

func GenerateMD5

func GenerateMD5(parameters ...interface{}) ([]byte, error)

GenerateMD5 - generates a md5 hash based on the specified parameters

func GenerateSHA1

func GenerateSHA1(parameters ...interface{}) ([]byte, error)

GenerateSHA1 - generates a sha1 hash based on the specified parameters

func GenerateSHA256

func GenerateSHA256(parameters ...interface{}) ([]byte, error)

GenerateSHA256 - generates a sha256 hash based on the specified parameters

func GenerateSHAKE added in v1.26.0

func GenerateSHAKE(algorithm Algorithm, outputSize int, parameters ...interface{}) ([]byte, error)

GenerateSHAKE - generates the shake hash using the selected algorithm

func GenerateSHAKE128 added in v1.26.0

func GenerateSHAKE128(outputSize int, parameters ...interface{}) ([]byte, error)

GenerateSHAKE128 - generates a shake128 hash based on the specified parameters

func GenerateSHAKE256 added in v1.26.0

func GenerateSHAKE256(outputSize int, parameters ...interface{}) ([]byte, error)

GenerateSHAKE256 - generates a shake256 hash based on the specified parameters

Types

type Algorithm added in v1.25.0

type Algorithm string

Algorithm - the algorithm constant type

const (
	// SHA256 - constant
	SHA256 Algorithm = "sha256"

	// SHA1 - constant
	SHA1 Algorithm = "sha1"

	// MD5 - constant
	MD5 Algorithm = "md5"

	// CRC32 - constant
	CRC32 Algorithm = "crc32"

	// SHAKE128 - constant
	SHAKE128 Algorithm = "shake128"

	// SHAKE256 - constant
	SHAKE256 Algorithm = "shake256"
)

Jump to

Keyboard shortcuts

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