rsa

package module
v0.0.0-...-107d9e8 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2019 License: MIT Imports: 7 Imported by: 0

README

rsa

A set of utility functions to read rsa key pairs from files

Build Status Coverage Status

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 value which defines a PrivateKey in a PEM block
	BlockPrivateKey = "RSA PRIVATE KEY"
)

Variables

This section is empty.

Functions

func GenerateRandomString

func GenerateRandomString(length int) (string, error)

GenerateRandomString of given length with crypto/rand

func UnmarshalPrivateKeyFromFile

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

UnmarshalPrivateKeyFromFile reads the given file and returns an RSA PrivateKey

func UnmarshalPublicKeyFromFile

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

UnmarshalPublicKeyFromFile reads the given file and returns an RSA PublicKey

Types

This section is empty.

Jump to

Keyboard shortcuts

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