softkms

package
v0.44.7 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 12 Imported by: 3

Documentation

Index

Constants

View Source
const DefaultRSAKeySize = 3072

DefaultRSAKeySize is the default size for RSA keys.

View Source
const Scheme = string(apiv1.SoftKMS)

Scheme is the scheme used in uris, the string "softkms".

Variables

This section is empty.

Functions

This section is empty.

Types

type SoftKMS

type SoftKMS struct{}

SoftKMS is a key manager that uses keys stored in disk.

func New

func New(_ context.Context, _ apiv1.Options) (*SoftKMS, error)

New returns a new SoftKMS.

func (*SoftKMS) Close

func (k *SoftKMS) Close() error

Close is a noop that just returns nil.

func (*SoftKMS) CreateDecrypter

func (k *SoftKMS) CreateDecrypter(req *apiv1.CreateDecrypterRequest) (crypto.Decrypter, error)

CreateDecrypter creates a new crypto.Decrypter backed by disk/software

func (*SoftKMS) CreateKey

func (k *SoftKMS) CreateKey(req *apiv1.CreateKeyRequest) (*apiv1.CreateKeyResponse, error)

CreateKey generates a new key using Golang crypto and returns both public and private key.

func (*SoftKMS) CreateSigner

func (k *SoftKMS) CreateSigner(req *apiv1.CreateSignerRequest) (crypto.Signer, error)

CreateSigner returns a new signer configured with the given signing key.

func (*SoftKMS) GetPublicKey

func (k *SoftKMS) GetPublicKey(req *apiv1.GetPublicKeyRequest) (crypto.PublicKey, error)

GetPublicKey returns the public key from the file passed in the request name.

Jump to

Keyboard shortcuts

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