fedops_encryption

package
v0.0.0-...-a8514d4 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2015 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(bytz []byte) ([]byte, error)

func Decrypt

func Decrypt(key, bytz []byte) ([]byte, error)

func Encode

func Encode(bytz []byte) []byte

func Encrypt

func Encrypt(key, bytz []byte) ([]byte, error)

func GenerateRandomBase64

func GenerateRandomBase64(s int) (string, error)

func GenerateRandomBytes

func GenerateRandomBytes(n int) ([]byte, error)

func GenerateRandomHex

func GenerateRandomHex(s int) (string, error)

func Hashkey

func Hashkey(key []byte) []byte

Types

type Cert

type Cert struct {
	// host string
	// ValidFrom string
	// ValidTo string
	// CA bool
	// KeySize int
	CertificatePem []byte
	PublicPem      []byte
	PrivatePem     []byte
}

func GenerateCert

func GenerateCert(certConfig Cert_Config) Cert

func (*Cert) Generate

func (c *Cert) Generate(certConfig Cert_Config)

type Cert_Config

type Cert_Config struct {
	IP string
}

type Keypair

type Keypair struct {
	// Keysize    int
	PublicPem  []byte
	PrivatePem []byte
	PublicSSH  []byte
}

func GenerateKeypair

func GenerateKeypair(keypairConfig Keypair_Config) Keypair

func (*Keypair) Generate

func (k *Keypair) Generate()

func (*Keypair) ToArray

func (k *Keypair) ToArray() []byte

func (*Keypair) ToString

func (k *Keypair) ToString() string

type Keypair_Config

type Keypair_Config struct {
}

Jump to

Keyboard shortcuts

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