crypto

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncryptPEM

func EncryptPEM(pemData, passphrase string) (string, error)

EncryptPEM returns an encrypted PEM block using the given passphrase.

func Key

func Key(keyType string) (string, error)

Key generates symmetric encryption keys according to given keyType.

func Keypair

func Keypair(keyType string) (interface{}, error)

Keypair generates crypto keys according to given key type.

func ToJWK

func ToJWK(key interface{}) (string, error)

ToJWK encodes given key using JWK.

func ToPEM

func ToPEM(key interface{}) (string, error)

ToPEM encodes the given key using PEM.

func ToSSH

func ToSSH(key interface{}) (string, error)

ToSSH encodes the given key as SSH key.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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