digestV2

package
v1.64.21 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bcrypt

type Bcrypt struct {
	// contains filtered or unexported fields
}

func (*Bcrypt) Check

func (my *Bcrypt) Check(hash string) bool

Check 校验

func (*Bcrypt) Hash

func (my *Bcrypt) Hash() (bytes []byte)

Hash 编码

type Bcrypter

type Bcrypter interface {
	Hash() (bytes []byte)
	Check(hash string) bool
}

func NewBcrypt

func NewBcrypt(password string) Bcrypter

NewBcrypt 实例化

type MD5

type MD5 struct {
	// contains filtered or unexported fields
}

func (*MD5) Encode

func (my *MD5) Encode() (string, error)

Md5 编码

type MD5Hasher

type MD5Hasher interface {
	Encode() (string, error)
}

func NewMD5

func NewMD5(original string) MD5Hasher

NewMD5 创建MD5编码器

type SHA

type SHA struct {
	// contains filtered or unexported fields
}

func (*SHA) Encode256

func (my *SHA) Encode256() (string, error)

Sha256 摘要算法

func (*SHA) Encode256Sum256

func (my *SHA) Encode256Sum256() string

Sha256Sum256 摘要算法

type SHAer

type SHAer interface {
	Encode256() (string, error)
	Encode256Sum256() string
}

func NewSHA

func NewSHA(original string) SHAer

type SM3

type SM3 struct {
	// contains filtered or unexported fields
}

func (*SM3) Encode

func (my *SM3) Encode() string

Sm3 生成sm3摘要

type SM3er

type SM3er interface{}

func NewSM3

func NewSM3(original string) SM3er

Jump to

Keyboard shortcuts

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