hashers

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hasher_md5

type Hasher_md5 struct {
	IHasher
}

func NewHasher_md5

func NewHasher_md5() *Hasher_md5

func (*Hasher_md5) Digest

func (*Hasher_md5) Digest(data []byte) []byte

func (*Hasher_md5) GetNames

func (*Hasher_md5) GetNames() []string

type Hasher_sha256

type Hasher_sha256 struct {
	IHasher
}

func NewHasher_sha256

func NewHasher_sha256() *Hasher_sha256

func (*Hasher_sha256) Digest

func (*Hasher_sha256) Digest(data []byte) []byte

func (*Hasher_sha256) GetNames

func (*Hasher_sha256) GetNames() []string

type IHasher

type IHasher interface {
	/* 算法名称 */
	GetNames() []string

	/* 执行数据摘要 */
	Digest(data []byte) []byte
}

Jump to

Keyboard shortcuts

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