streams

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//DirectionEncrypt for encryption
	DirectionEncrypt = iota

	//DirectionDecrypt for decryption
	DirectionDecrypt = iota
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HashedBlock

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

HashedBlock represents a hashed block

func NewHashedBlock

func NewHashedBlock(mode cipher.BlockMode, stream *SymmetricCipherStream) *HashedBlock

NewHashedBlock create new hashed block

func (*HashedBlock) ReadData

func (hb *HashedBlock) ReadData(data *[]byte, maxSize int) (int, error)

ReadData in hashed blocks

type Salsa20Stream

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

Salsa20Stream represents a symmetric cipher

func NewSalsa20Stream

func NewSalsa20Stream(nonce []byte, key *[32]byte) *Salsa20Stream

NewSalsa20Stream new stream

func (*Salsa20Stream) ProcessInPlace

func (s *Salsa20Stream) ProcessInPlace(data []byte)

ProcessInPlace update slice in place

type SymmetricCipherStream

type SymmetricCipherStream struct {
	Block     cipher.Block
	BlockMode cipher.BlockMode
	// contains filtered or unexported fields
}

SymmetricCipherStream represents a symmetric cipher

func NewSymmetricCipherStream

func NewSymmetricCipherStream(block cipher.Block, encryptionIV []byte, db *os.File, direction int) (*SymmetricCipherStream, error)

NewSymmetricCipherStream new stream

func (*SymmetricCipherStream) ReadData

func (s *SymmetricCipherStream) ReadData(data *[]byte, maxSize int) (int, error)

ReadData read data from stream

Jump to

Keyboard shortcuts

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