utils

package
v0.0.0-...-b149654 Latest Latest
Warning

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

Go to latest
Published: May 7, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BlockPublicKey contains the value which defines a Public Key in a PEM block
	BlockPublicKey = "PUBLIC KEY"
	// BlockPrivateKey contains the vlaue which defines a PrivateKey in a PEM block
	BlockPrivateKey = "PRIVATE KEY"
)

Variables

This section is empty.

Functions

func GenerateRandomString

func GenerateRandomString(length int) string

GenerateRandomString with crypto/rand

func UnmarshalRSAPrivateKeyFromFile

func UnmarshalRSAPrivateKeyFromFile(file string) (*rsa.PrivateKey, error)

UnmarshalRSAPrivateKeyFromFile reads the given file and returns a PrivateKey

func UnmarshalRSAPublicKeyFromFile

func UnmarshalRSAPublicKeyFromFile(file string) (*rsa.PublicKey, error)

UnmarshalRSAPublicKeyFromFile reads the given file and returns a PublicKey

Types

This section is empty.

Jump to

Keyboard shortcuts

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