ghash

package
v0.0.0-...-047dcd9 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2021 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetHMAC

func GetHMAC(hashType HashType, plain, secret []byte) []byte

GetHMAC returns a keyed-hash message authentication code using the desired hashtype

func GetHex

func GetHex(message []byte) string

func GetMD5

func GetMD5(message []byte) []byte

GetMD5 returns a MD5 hash of a byte array

func GetSHA1

func GetSHA1(message []byte) []byte

func GetSHA256

func GetSHA256(message []byte) []byte

GetSHA256 returns a SHA256 hash of a byte array

func GetSHA512

func GetSHA512(message []byte) []byte

GetSHA512 returns a SHA512 hash of a byte array

func HexEncodeToString

func HexEncodeToString(message []byte) string

HexEncodeToString takes in a hexadecimal byte array and returns a string

func Md5Buf

func Md5Buf(buf []byte) (string, error)

func Md5File

func Md5File(filename string) (string, error)

func Md5Str

func Md5Str(str string) (string, error)

Types

type HashType

type HashType string
const (
	HashTypeSHA1       HashType = "sha1"
	HashTypeSHA256     HashType = "sha256"
	HashTypeSHA512     HashType = "sha512"
	HashTypeSHA512_384 HashType = "sha512_384"
	HashTypeMD5        HashType = "md5"
)

Jump to

Keyboard shortcuts

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