crypto

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package crypto provides functions to for cryptography and random numbers.

Index

Constants

View Source
const (
	// RNGLengthDefault is the number of bytes used for generating nonces.
	RNGLengthDefault = 32
)

Variables

This section is empty.

Functions

func GenerateCertificateSerialNumber

func GenerateCertificateSerialNumber() (*big.Int, error)

GenerateCertificateSerialNumber generates a random serial number for an X.509 certificate.

func GenerateRandomBytes

func GenerateRandomBytes(length int) ([]byte, error)

GenerateRandomBytes reads length bytes from getrandom(2) if available, /dev/urandom otherwise.

Types

This section is empty.

Jump to

Keyboard shortcuts

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