hash

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package hash provides en: a set of constants and functions for working with hash functions in relation to the GOST encryption standard ru: набор констант и функции работы с хеш функциями применительно стандарта шифрования GOST

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Function

type Function string
const (
	UnknownHashFunction Function = "UnknownHashFunction"
	SHA1                Function = "SHA1"
	SHA256              Function = "SHA256"
	SHA384              Function = "SHA384"
	SHA512              Function = "SHA512"
	GostR341194         Function = "GostR341194"
	GostR34112012256    Function = "GostR34112012256" //Stribog GOST R 34.11-2012 256-bit
	GostR34112012512    Function = "GostR34112012512" //Stribog GOST R 34.11-2012 512-bit
)

func Get

func Get(oidID oids.ID) (Function, error)

Get en: get hash function by the corresponding oids.ID const ru: получить хэш функцию по соответствующей oids.ID константе

func (Function) CryptoHash

func (h Function) CryptoHash() crypto.Hash

CryptoHash en: returns standard hash functions ru: возвращает стандартные хеш функции

func (Function) IsActual

func (h Function) IsActual() bool

IsActual en: is this hash function actual? ru: актуальна ли данная хеш функция?

func (Function) New

func (h Function) New() hash.Hash

New en: returns a new hash.Hash calculating the given hash function. ru: возвращает новый hash.Hash, вычисляющий заданную хэш-функцию.

Jump to

Keyboard shortcuts

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