secure

package
v0.0.0-...-58feb97 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptIV

func DecryptIV(ciphertext []byte, key []byte) ([]byte, error)

func EncryptIV

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

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