sm3

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: Apache-2.0 Imports: 6 Imported by: 17

Documentation

Overview

Package sm3 handle shangmi sm3 hash algorithm

Index

Constants

View Source
const BlockSize int = 64

SM3散列块字节数

View Source
const Size int = 32

SM3校验和字节数,即散列结果的字节长度

Variables

This section is empty.

Functions

func New

func New() hash.Hash

New生成一个新的hash.Hash,用来计算SM3校验和。 New returns a new hash.Hash computing the SM3 checksum. The Hash also implements encoding.BinaryMarshaler and encoding.BinaryUnmarshaler to marshal and unmarshal the internal state of the hash.

func Sm3Sum

func Sm3Sum(data []byte) []byte

Sm3Sum returns the SM3 checksum of the data.

func Sm3SumArr

func Sm3SumArr(data []byte) (sum_sm3 [Size]byte)

Types

This section is empty.

Jump to

Keyboard shortcuts

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