cipher

package
Version: v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2019 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GarbageByte byte = 1
)

Variables

This section is empty.

Functions

func CompactBuffer

func CompactBuffer(str []byte) []byte

func CreateToken

func CreateToken() []byte

CreateToken creates a random-generated token of 256 bits represented as a byte slice. If the token cannot be generated, returns nil.

func ExpandBuffer

func ExpandBuffer(str []byte, baseSize int) []byte

Types

type AES256Cypher

type AES256Cypher struct{}

func (AES256Cypher) Decrypt

func (cypher AES256Cypher) Decrypt(source []byte, key []byte) []byte

func (AES256Cypher) Encrypt

func (cypher AES256Cypher) Encrypt(source []byte, key []byte) []byte

Source Files

Jump to

Keyboard shortcuts

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