GBClientAESEncryption

package
v0.0.0-...-3040e0b Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2015 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRandomFailure = fmt.Errorf("failed to read enough random data")
	ErrPadding       = fmt.Errorf("failed to pad")
	ErrInvalidIV     = fmt.Errorf("invalid IV")
)

Functions

func Decrypt

func Decrypt(key []byte, ct []byte) (msg []byte, err error)

func Encrypt

func Encrypt(key []byte, msg []byte) (ct []byte, err error)

func GenerateIV

func GenerateIV() (iv []byte, err error)

func GenerateKeyIfNoneExists

func GenerateKeyIfNoneExists(filepath string, size int, activation_key string) (err error)

func GenerateRandomByteSlice

func GenerateRandomByteSlice(size int) (b []byte, err error)

func GetSymmetricKey

func GetSymmetricKey(filepath string, size int, activation_key string) ([]byte, error)

func PadBuffer

func PadBuffer(m []byte) (p []byte, err error)

func UnpadBuffer

func UnpadBuffer(p []byte) (m []byte, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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