pkcs8

package
v2.0.0-...-c1c857e Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertECPrivateKeyPEM

func ConvertECPrivateKeyPEM(inPEM []byte) ([]byte, error)

ConvertECPrivateKeyPEM takes an EC Private Key as input and returns PKCS#8 version of it

func ConvertToECPrivateKeyPEM

func ConvertToECPrivateKeyPEM(inPEM []byte) ([]byte, error)

ConvertToECPrivateKeyPEM takes an unencrypted PKCS#8 PEM and converts it to EC Private Key

func DecryptPEMBlock

func DecryptPEMBlock(block *pem.Block, password []byte) ([]byte, error)

DecryptPEMBlock requires PKCS#8 PEM Block and password to decrypt and return unencrypted der []byte

func EncryptPEMBlock

func EncryptPEMBlock(data, password []byte) (*pem.Block, error)

EncryptPEMBlock takes DER-format bytes and password to return an encrypted PKCS#8 PEM-block

func IsEncryptedPEMBlock

func IsEncryptedPEMBlock(block *pem.Block) bool

IsEncryptedPEMBlock checks if a PKCS#8 PEM-block is encrypted or not

func ParsePrivateKeyPEMWithPassword

func ParsePrivateKeyPEMWithPassword(pemBytes, password []byte) (crypto.Signer, error)

ParsePrivateKeyPEMWithPassword parses an encrypted or a decrypted PKCS#8 PEM to crypto.signer

Types

This section is empty.

Jump to

Keyboard shortcuts

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