crypto

package
v0.0.0-...-df91a52 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2016 License: GPL-3.0, CC0-1.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const CLIENT_TO_SERVER_IV = "client_to_server"
View Source
const OBFUSCATE_HASH_ITERATIONS = 6000
View Source
const OBFUSCATE_KEY_LENGTH = 16
View Source
const OBFUSCATE_MAGIC_VALUE uint32 = 0x0BF5CA7E
View Source
const OBFUSCATE_MAX_PADDING = 32
View Source
const OBFUSCATE_SEED_LENGTH = 16

Variables

This section is empty.

Functions

This section is empty.

Types

type Crypto

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

func New

func New(pubKey, privKey [32]byte) (cr *Crypto)

func (*Crypto) Decrypt

func (cr *Crypto) Decrypt(data []byte) ([]byte, error)

func (*Crypto) Deobfuscate

func (cr *Crypto) Deobfuscate(data []byte, obfuscationKeyword string) ([]byte, error)

func (*Crypto) Encrypt

func (cr *Crypto) Encrypt(data []byte) ([]byte, error)

func (*Crypto) Obfuscate

func (cr *Crypto) Obfuscate(data []byte, obfuscationKeyword string) ([]byte, error)

Jump to

Keyboard shortcuts

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