cryptoutils

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RandReader = rand.Reader

RandReader is the io.Reader that produces cryptographically random bytes when they are need by the library. The default value is rand.Reader, but it can be replaced for testing.

Functions

func LoadCert

func LoadCert(file string) ([]*x509.Certificate, error)

func LoadMultiBlockPem

func LoadMultiBlockPem(path string, password string) ([]interface{}, error)

LoadMultiBlockPem load items (cert, private key, public key, etc.) from pem file. Supported block types are

  • * PRIVATE KEY
  • PUBLIC KEY
  • CERTIFICATE

func LoadPrivateKey

func LoadPrivateKey(file string, keyPassword string) (*rsa.PrivateKey, error)

func RandomBytes

func RandomBytes(n int) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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