gost_r_34_12_2015

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: 6 Imported by: 0

Documentation

Overview

func New(key []byte) (cipher.AEAD, error) {} func (cphr *Cipher) Seal(dst, nonce, plaintext, addData []byte) []byte {} func (cphr *Cipher) Open(dst, nonce, ciphertext, addData []byte) ([]byte, error) {} func (cphr *Cipher) NonceSize() int {} func (cphr *Cipher) Overhead() int {}

ГОСТ Р 34.12-2015 https://docs.cntd.ru/document/1200121983

Index

Constants

View Source
const (
	KeySize   = 32
	BlockSize = 16
	NonceSize = 16
	Overhead  = ghash.Size256
)
View Source
const (
	CipherType = "ГОСТ Р 34.12-2015"
)

Variables

This section is empty.

Functions

func New

func New(key []byte) (cipher.AEAD, error)

Mac-then-encrypt

Types

type Cipher

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

func (*Cipher) NonceSize

func (cphr *Cipher) NonceSize() int

func (*Cipher) Open

func (cphr *Cipher) Open(dst, nonce, ciphertext, addData []byte) ([]byte, error)

Decrypt with authentication information.

func (*Cipher) Overhead

func (cphr *Cipher) Overhead() int

func (*Cipher) Seal

func (cphr *Cipher) Seal(dst, nonce, plaintext, addData []byte) []byte

Encrypt with authentication information.

Jump to

Keyboard shortcuts

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