hmacx

package
v0.0.0-...-ca8ceaf Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: MIT Imports: 9 Imported by: 0

README

hmacx

Go hmac functions

Installation

go get github.com/mzccddkk/gdk/hmacx

Functions

hmac:

func Hmac(str string, key string, h func() hash.Hash) string

func Md5(str string, key string) string

func Sha1(str string, key string) string

func Sha256(str string, key string) string

func Sha512(str string, key string) string

hmacfile:

func HmacFile(filename string, key string, h func() hash.Hash) (string, error)

func Md5File(filename string, key string) (string, error)

func Sha1File(filename string, key string) (string, error)

func Sha256File(filename string, key string) (string, error)

func Sha512File(filename string, key string) (string, error)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hmac

func Hmac(str string, key string, h func() hash.Hash) string

Hmac Calculate the hash value using the HMAC method

func HmacFile

func HmacFile(filename string, key string, h func() hash.Hash) (string, error)

HmacFile Calculate file hash value using the HMAC method

func Md5

func Md5(str string, key string) string

Md5 Calculate the md5 hash value using the HMAC method

func Md5File

func Md5File(filename string, key string) (string, error)

Md5File Calculate file md5 hash value using the HMAC method

func Sha1

func Sha1(str string, key string) string

Sha1 Calculate the sha1 hash value using the HMAC method

func Sha1File

func Sha1File(filename string, key string) (string, error)

Sha1File Calculate file sha1 hash value using the HMAC method

func Sha256

func Sha256(str string, key string) string

Sha256 Calculate the sha256 hash value using the HMAC method

func Sha256File

func Sha256File(filename string, key string) (string, error)

Sha256File Calculate file sha256 hash value using the HMAC method

func Sha512

func Sha512(str string, key string) string

Sha512 Calculate the sha512 hash value using the HMAC method

func Sha512File

func Sha512File(filename string, key string) (string, error)

Sha512File Calculate file sha512 hash value using the HMAC method

Types

This section is empty.

Jump to

Keyboard shortcuts

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