native

package
v1.3.3-0...-f31c912 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: AGPL-3.0 Imports: 15 Imported by: 177

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateEICEKey

func GenerateEICEKey() (publicKey any, privateKey any, err error)

GenerateEICEKey generates a key that can be send to an Amazon EC2 instance using the ec2instanceconnect.SendSSHPublicKey method.

func GenerateKeyPair

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

GenerateKeyPair generates a new RSA key pair.

func GeneratePrivateKey

func GeneratePrivateKey() (*keys.PrivateKey, error)

GeneratePrivateKey generates a new RSA private key.

func GenerateRSAPrivateKey

func GenerateRSAPrivateKey() (*rsa.PrivateKey, error)

func IsBoringBinary

func IsBoringBinary() bool

IsBoringBinary checks if the binary was compiled with BoringCrypto.

func PrecomputeKeys

func PrecomputeKeys()

PrecomputeKeys sets this package into a mode where a small backlog of keys are computed in advance. This should only be enabled if large spikes in key computation are expected (e.g. in auth/proxy services). Safe to double-call.

func PrecomputeTestKeys

func PrecomputeTestKeys(_ *testing.M)

PrecomputeTestKeys generates RSA keys and reuse them to reduce CPU usage. This method should only be in tests. Safe to call multiple times. This function takes *testing.M, so is only can be used from TestMain in tests.

Types

This section is empty.

Jump to

Keyboard shortcuts

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