crypto

package
v0.0.0-...-9bb4683 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCRC32

func GetCRC32(b []byte) string

GetCRC32 returns CRC32 checksum in hex format.

func GetGMSM3

func GetGMSM3(b []byte) string

func GetMD5

func GetMD5(b []byte) string

GetMD5 returns MD5 hash.

func GetSHA1

func GetSHA1(b []byte) string

GetSHA1 returns SHA1 hash.

func GetSHA256

func GetSHA256(b []byte) string

GetSHA256 returns SHA256 hash.

func GetSHA512

func GetSHA512(b []byte) string

GetSHA512 returns SHA512 hash.

func GetSSDeep

func GetSSDeep(b []byte) (string, error)

GetSSDeep returns ssdeep fuzzy hash.

Types

type Result

type Result struct {
	CRC32  uint32
	MD5    string
	SHA1   string
	SHA256 string
	SHA512 string
	SSDeep string
	GMSM3  string // 国密 SM3
}

Result aggregates all hashes.

func HashBytes

func HashBytes(data []byte) Result

HashBytes run all crypto modules and return results.

Jump to

Keyboard shortcuts

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