xhash

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hash

func Hash(b []byte, h hash.Hash) []byte

Hash 计算hash

func Hmac

func Hmac(b []byte, key []byte, h func() hash.Hash) []byte

Hmac hmac

func HmacSHA1

func HmacSHA1(b, key []byte) []byte

HmacSHA1 hmac sha1

func HmacSHA1Hex

func HmacSHA1Hex(s, key string) string

HmacSHA1Hex string hmac sha1

func HmacSHA256

func HmacSHA256(b, key []byte) []byte

HmacSHA256 hmac sha256

func HmacSHA256Hex

func HmacSHA256Hex(s, key string) string

HmacSHA256Hex string hmac sha256

func HmacSHA512

func HmacSHA512(b, key []byte) []byte

HmacSHA512 hmac sha512

func HmacSHA512Hex

func HmacSHA512Hex(s, key string) string

HmacSHA512Hex string hmac sha512

func MD5

func MD5(b []byte) []byte

MD5 计算 md5

func MD5File

func MD5File(filename string) (string, error)

MD5File 文件MD5

func MD5Hex

func MD5Hex(s string) string

MD5Hex 字符串 md5

func MD5Reader

func MD5Reader(r io.Reader) (string, error)

MD5Reader 计算 md5

func Sha1

func Sha1(b []byte) []byte

Sha1 sha1

func Sha1Hex

func Sha1Hex(s string) string

Sha1Hex string sha1

func Sha256

func Sha256(b []byte) []byte

Sha256 sha256

func Sha256Hex

func Sha256Hex(s string) string

Sha256Hex string sha256

func Sha512

func Sha512(b []byte) []byte

Sha512 sha512

func Sha512Hex

func Sha512Hex(s string) string

Sha512Hex string sha512

Types

This section is empty.

Jump to

Keyboard shortcuts

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