util

package
v0.0.0-...-bcf92e7 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	HASHLEN       = 32
	PRIVATEKEYLEN = 32
	PUBLICKEYLEN  = 32
	SIGNRLEN      = 32
	SIGNSLEN      = 32
	SIGNATURELEN  = 64
	NEGBIGNUMLEN  = 33
)

Variables

This section is empty.

Functions

func CheckMAC

func CheckMAC(message, messageMAC, key []byte) bool

CheckMAC reports whether messageMAC is a valid HMAC tag for message.

func Hash

func Hash(data []byte) [HASHLEN]byte

func RIPEMD160

func RIPEMD160(value []byte) []byte

func RandomNum

func RandomNum(n int) ([]byte, error)

RandomNum Generate the "real" random number which can be used for crypto algorithm

func SM3

func SM3(data []byte) [HASHLEN]byte

Types

type CryptoAlgSet

type CryptoAlgSet struct {
	EccParams elliptic.CurveParams
	Curve     elliptic.Curve
}

Jump to

Keyboard shortcuts

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