pemc

package
v0.0.0-...-57cc1b4 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToECDSAPrivateKey

func ToECDSAPrivateKey(key []byte) (*ecdsa.PrivateKey, error)

ToECDSAPrivateKey parses a PEM encoded Elliptic Curve Private Key Structure

func ToECDSAPublicKey

func ToECDSAPublicKey(key []byte) (*ecdsa.PublicKey, error)

ToECDSAPublicKey parses a PEM encoded PKCS1 or PKCS8 public key

func ToEd25519PrivateKey

func ToEd25519PrivateKey(key []byte) (ed25519.PrivateKey, error)

ToEd25519PrivateKey parses a PEM-encoded Edwards curve private key

func ToEd25519PublicKey

func ToEd25519PublicKey(key []byte) (ed25519.PublicKey, error)

ToEd25519PublicKey parses a PEM-encoded Edwards curve public key

func ToRSAPrivateKey

func ToRSAPrivateKey(key []byte) (*rsa.PrivateKey, error)

ToRSAPrivateKey parses a PEM encoded PKCS1 or PKCS8 private key

func ToRSAPrivateKeyWithPassword deprecated

func ToRSAPrivateKeyWithPassword(key []byte, password string) (*rsa.PrivateKey, error)

ToRSAPrivateKeyWithPassword parses a PEM encoded PKCS1 or PKCS8 private key protected with password

Deprecated: This function is deprecated and should not be used anymore. It uses the deprecated x509.DecryptPEMBlock function, which was deprecated since RFC 1423 is regarded insecure by design. Unfortunately, there is no alternative in the Go standard library for now. See https://github.com/golang/go/issues/8860.

func ToRSAPublicKey

func ToRSAPublicKey(key []byte) (*rsa.PublicKey, error)

ToRSAPublicKey parses a certificate or a PEM encoded PKCS1 or PKIX public key

Types

This section is empty.

Jump to

Keyboard shortcuts

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