cryptstate

package
v0.0.0-...-88649aa Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2012 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DecryptHistorySize = 0x100

Variables

This section is empty.

Functions

This section is empty.

Types

type CryptState

type CryptState struct {
	RawKey    [aes.BlockSize]byte
	EncryptIV [aes.BlockSize]byte
	DecryptIV [aes.BlockSize]byte

	LastGoodTime int64

	Good         uint32
	Late         uint32
	Lost         uint32
	Resync       uint32
	RemoteGood   uint32
	RemoteLate   uint32
	RemoteLost   uint32
	RemoteResync uint32
	// contains filtered or unexported fields
}

func New

func New() (cs *CryptState, err error)

func (*CryptState) Decrypt

func (cs *CryptState) Decrypt(dst, src []byte) (err error)

func (*CryptState) Encrypt

func (cs *CryptState) Encrypt(dst, src []byte)

func (*CryptState) GenerateKey

func (cs *CryptState) GenerateKey() (err error)

func (*CryptState) OCBDecrypt

func (cs *CryptState) OCBDecrypt(plain []byte, encrypted []byte, nonce []byte, tag []byte) (err error)

func (*CryptState) OCBEncrypt

func (cs *CryptState) OCBEncrypt(dst []byte, src []byte, nonce []byte, tag []byte) (err error)

func (*CryptState) SetKey

func (cs *CryptState) SetKey(key []byte, eiv []byte, div []byte) (err error)

Jump to

Keyboard shortcuts

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