crypto

package
v0.0.0-...-54d5358 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2024 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

package crypto provides a simple interface to common cryptographic primitives.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseRSAPrivateKey

func ParseRSAPrivateKey(pemBytes []byte) (*rsa.PublicKey, *rsa.PrivateKey, error)

ParseRSAPrivateKey parses a PEM encoded private key, and returns the public key and private key.

Types

type Keypair

type Keypair struct {
	PublicKey  []byte
	PrivateKey []byte
}

KeyPair represents a public/private keypair in PEM format.

func GenerateRSAKeypair

func GenerateRSAKeypair() (*Keypair, error)

Jump to

Keyboard shortcuts

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