gost_r_34_11_2012

package
v0.0.0-...-69733fb Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

func New(prov ProvType) Hash {} func (hasher *Hash) Write(p []byte) (n int, err error) {} func (hasher *Hash) Sum(p []byte) []byte {} func (hasher *Hash) Reset() {} func (hasher *Hash) Size() int {} func (hasher *Hash) BlockSize() int {} func (hasher *Hash) Type() string {}

func Sum(prov ProvType, data []byte) []byte {} func NewHMAC(prov ProvType, key []byte) Hash {} func SumHMAC(prov ProvType, key, data []byte) []byte {}

ГОСТ Р 34.11-2012 https://docs.cntd.ru/document/1200095035

Index

Constants

View Source
const (
	Size256   = 32
	Size512   = 64
	BlockSize = 64
)
View Source
const (
	HashType = "ГОСТ Р 34.11-2012"
)

Variables

This section is empty.

Functions

func Sum

func Sum(prov ProvType, data []byte) []byte

Computing a hash(256 or 512) at a time.

func SumHMAC

func SumHMAC(prov ProvType, key, data []byte) []byte

Computing a hmac(256 or 512) at a time.

Types

type Hash

type Hash hash.Hash

func New

func New(prov ProvType) Hash

Create Hash object.

func NewHMAC

func NewHMAC(prov ProvType, key []byte) Hash

Create Hash(HMAC) object.

type Hash256

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

func (*Hash256) BlockSize

func (hasher *Hash256) BlockSize() int

func (*Hash256) Reset

func (hasher *Hash256) Reset()

func (*Hash256) Size

func (hasher *Hash256) Size() int

func (*Hash256) Sum

func (hasher *Hash256) Sum(p []byte) []byte

func (*Hash256) Type

func (hasher *Hash256) Type() string

func (*Hash256) Write

func (hasher *Hash256) Write(p []byte) (n int, err error)

type Hash512

type Hash512 Hash256

func (*Hash512) BlockSize

func (hasher *Hash512) BlockSize() int

Input block size for hash function.

func (*Hash512) Reset

func (hasher *Hash512) Reset()

Clear data in Hash object.

func (*Hash512) Size

func (hasher *Hash512) Size() int

Output block size from hash function.

func (*Hash512) Sum

func (hasher *Hash512) Sum(p []byte) []byte

If the interface function takes a non-zero argument, then there is a redirection to the Sum function.

func (*Hash512) Type

func (hasher *Hash512) Type() string

Retrieving a format string "ГОСТ Р 34.11-2012_???".

func (*Hash512) Write

func (hasher *Hash512) Write(p []byte) (n int, err error)

Writing a piece of information to the Hash object.

type ProvType

type ProvType byte
const (
	H256 ProvType = 80
	H512 ProvType = 81
)

func (ProvType) Size

func (h ProvType) Size() int

func (ProvType) String

func (h ProvType) String() string

Jump to

Keyboard shortcuts

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