rsautil

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKey2048

func NewKey2048() (privateKey, publicKey []byte, err error)

NewKey2048 will generate a new 2048 bit key for RSA

2048 bits is generally considered the best tradeoff between security and performance at the time of writing. Probably this will remain the case until 2030.

func NewKey3072

func NewKey3072() (privateKey, publicKey []byte, err error)

NewKey3072 will generate a new 3072 bit key for RSA.

Use a 3072 bit key for extra performance, at the cost of performance.

func NewKey4096

func NewKey4096() (privateKey, publicKey []byte, err error)

NewKey4096 will generate a new 4096 bit key for RSA

Use a 4096 bit key maximum security, at the cost of performance.

func PemToPrivateKey

func PemToPrivateKey(pemData []byte) (*rsa.PrivateKey, error)

func PemToPublicKey

func PemToPublicKey(pemData []byte) (*rsa.PublicKey, error)

func PrivateKeyToPem

func PrivateKeyToPem(key *rsa.PrivateKey) []byte

func PublicKeyToPem

func PublicKeyToPem(key *rsa.PublicKey) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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