secure

package
v0.0.0-...-657bed6 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptIV

func DecryptIV(encrypted []byte, key []byte, iv []byte) ([]byte, error)

func EncryptIV

func EncryptIV(decrypted []byte, key []byte, iv []byte) ([]byte, error)

func PKCS5Padding

func PKCS5Padding(src []byte, blockSize int) []byte

func PKCS5UnPadding

func PKCS5UnPadding(src []byte) []byte

Types

type NetworkSecret

type NetworkSecret struct {
	Key []byte
	Net *net.IPNet
}

func NetworkSecretUnmarshal

func NetworkSecretUnmarshal(v string) (*NetworkSecret, error)

func NewNetworkSecret

func NewNetworkSecret(network *net.IPNet) *NetworkSecret

func (NetworkSecret) Bytes

func (ns NetworkSecret) Bytes() []byte

func (NetworkSecret) CIDR

func (ns NetworkSecret) CIDR() string

func (NetworkSecret) Encode

func (ns NetworkSecret) Encode(data []byte) []byte

func (NetworkSecret) InfoHash

func (ns NetworkSecret) InfoHash() string

func (NetworkSecret) Marshal

func (ns NetworkSecret) Marshal() string

Jump to

Keyboard shortcuts

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