sm3

package
v0.0.0-...-2e8d15a Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2019 License: Apache-2.0, Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() hash.Hash

func Sm3Sum

func Sm3Sum(data []byte) []byte

Types

type SM3

type SM3 struct {
	// contains filtered or unexported fields
}

func (*SM3) BlockSize

func (sm3 *SM3) BlockSize() int

BlockSize, required by the hash.Hash interface. BlockSize returns the hash's underlying block size. The Write method must be able to accept any amount of data, but it may operate more efficiently if all writes are a multiple of the block size.

func (*SM3) Reset

func (sm3 *SM3) Reset()

Reset clears the internal state by zeroing bytes in the state buffer. This can be skipped for a newly-created hash state; the default zero-allocated state is correct.

func (*SM3) Size

func (sm3 *SM3) Size() int

Size, required by the hash.Hash interface. Size returns the number of bytes Sum will return.

func (*SM3) Sum

func (sm3 *SM3) Sum(in []byte) []byte

Sum, required by the hash.Hash interface. Sum appends the current hash to b and returns the resulting slice. It does not change the underlying hash state.

func (*SM3) Write

func (sm3 *SM3) Write(p []byte) (int, error)

Write, required by the hash.Hash interface. Write (via the embedded io.Writer interface) adds more data to the running hash. It never returns an error.

Jump to

Keyboard shortcuts

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