crypto

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2025 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package crypto provides methods for generating and processing x509 public and private keys.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateKeyPair

func GenerateKeyPair(sz int) ([]byte, []byte, error)

GenerateKeyPair generates a new public and private x509 key of size 'sz'.

func RSAPrivateKeyFromPEM

func RSAPrivateKeyFromPEM(str_pem string) (*rsa.PrivateKey, error)

RSAPrivateKeyFromPEM returns a new `rsa.PrivateKey` instance derived from 'str_pem'.

func RSAPublicKeyFromPEM

func RSAPublicKeyFromPEM(str_pem string) (*rsa.PublicKey, error)

RSAPublicKeyFromPEM returns a new `rsa.PublicKey` instance derived from 'str_pem'.

Types

This section is empty.

Jump to

Keyboard shortcuts

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