hash

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxFileBlock = 10 * 1024 * 1024
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseStruct

type BaseStruct struct {
	Err error
	// contains filtered or unexported fields
}

func (BaseStruct) String

func (e BaseStruct) String() string

String implements the interface Stringer for encode struct. 实现 Stringer 接口

func (BaseStruct) ToBase32Bytes

func (e BaseStruct) ToBase32Bytes() []byte

ToBase32Bytes outputs as byte slice with base32 encoding. 输出经过 base32 编码的字节切片

func (BaseStruct) ToBase32String

func (e BaseStruct) ToBase32String() string

ToBase32String outputs as string with base32 encoding. 输出经过 base32 编码的字符串

func (BaseStruct) ToBase64Bytes

func (e BaseStruct) ToBase64Bytes() []byte

ToBase64Bytes outputs as byte slice with base64 encoding. 输出经过 base64 编码的字节切片

func (BaseStruct) ToBase64String

func (e BaseStruct) ToBase64String() string

ToBase64String outputs as string with base64 encoding. 输出经过 base64 编码的字符串

func (BaseStruct) ToBytes

func (e BaseStruct) ToBytes() []byte

ToBytes outputs as byte slice. 输出字节切片

func (BaseStruct) ToHexBytes

func (e BaseStruct) ToHexBytes() []byte

ToHexBytes outputs as byte with hex encoding. 输出经过 hex 编码的字节切片

func (BaseStruct) ToHexString

func (e BaseStruct) ToHexString() string

ToHexString outputs as string with hex encoding. 输出经过 hex 编码的字符串

func (BaseStruct) ToString

func (e BaseStruct) ToString() string

ToString outputs as string. 输出字符串

type Hash

type Hash struct {
	BaseStruct
}

func NewHash

func NewHash() Hash

func (Hash) ByHmacMd5

func (e Hash) ByHmacMd5(key interface{}) Hash

ByHmacMd5 encrypts by hmac_md5. 通过 hmac_md5 加密

func (Hash) ByHmacSha1

func (e Hash) ByHmacSha1(key interface{}) Hash

ByHmacSha1 encrypts by hmac_sha1. 通过 hmac_sha1 加密

func (Hash) ByHmacSha224

func (e Hash) ByHmacSha224(key interface{}) Hash

ByHmacSha224 encrypts by hmac_sha224. 通过 hmac_sha224 加密

func (Hash) ByHmacSha256

func (e Hash) ByHmacSha256(key interface{}) Hash

ByHmacSha256 encrypts by hmac_sha256. 通过 hmac_sha256 加密

func (Hash) ByHmacSha384

func (e Hash) ByHmacSha384(key interface{}) Hash

ByHmacSha384 encrypts by hmac_sha384. 通过 hmac_sha384 加密

func (Hash) ByHmacSha512

func (e Hash) ByHmacSha512(key interface{}) Hash

ByHmacSha512 encrypts by hmac_sha512. 通过 hmac_sha512 加密

func (Hash) ByHmacSha512224

func (e Hash) ByHmacSha512224(key interface{}) Hash

ByHmacSha512224 encrypts by hmac_sha512_224. 通过 hmac_sha512_224 加密

func (Hash) ByHmacSha512256

func (e Hash) ByHmacSha512256(key interface{}) Hash

ByHmacSha512256 encrypts by hmac_sha512_256. 通过 hmac_sha512_256 加密

func (Hash) ByMd5

func (e Hash) ByMd5() Hash

ByMd5 encrypts by md5. 通过 md5 加密

func (Hash) BySha1

func (e Hash) BySha1() Hash

BySha1 encrypts by sha1. 通过 sha1 加密

func (Hash) BySha224

func (e Hash) BySha224() Hash

BySha224 encrypts by sha224. 通过 sha224 加密

func (Hash) BySha256

func (e Hash) BySha256() Hash

BySha256 encrypts by sha256. 通过 sha256 加密

func (Hash) BySha384

func (e Hash) BySha384() Hash

BySha384 encrypts by sha384. 通过 sha384 加密

func (Hash) BySha512

func (e Hash) BySha512() Hash

BySha512 encrypts by sha512. 通过 sha512 加密

func (Hash) BySha512224

func (e Hash) BySha512224() Hash

BySha512224 encrypts by sha512_224. 通过 sha512_224 加密

func (Hash) BySha512256

func (e Hash) BySha512256() Hash

BySha512256 encrypts by sha512_256. 通过 sha512_256 加密

func (Hash) FromBytes

func (e Hash) FromBytes(b []byte) Hash

FromBytes hash from byte slice. 对字节切片进行编码

func (Hash) FromFile

func (e Hash) FromFile(f interface{}) Hash

FromFile hash from file. 对文件进行编码

func (Hash) FromString

func (e Hash) FromString(s string) Hash

FromString hash from string. 对字符串进行编码

Jump to

Keyboard shortcuts

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