sm3

package
v0.15.6 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package sm3 handle shangmi sm3 hash algorithm

Index

Constants

View Source
const BlockSize int = 64

BlockSize the blocksize of SM3 in bytes.

View Source
const Size int = 32

Size the size of a SM3 checksum in bytes.

View Source
const SizeBitSize = 5

SizeBitSize the bit size of Size.

Variables

This section is empty.

Functions

func New

func New() hash.Hash

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 Sum

func Sum(data []byte) [Size]byte

Sum returns the SM3 checksum of the data.

Types

This section is empty.

Jump to

Keyboard shortcuts

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