softkms

package
v0.18.1 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultRSAKeySize = 3072

DefaultRSAKeySize is the default size for RSA keys.

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(ctx context.Context, opts 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 added in v0.15.16

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