kmssigner

package
v0.0.0-...-84daedb Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package kmssigner implements a crypto.Signer backed by Google Cloud KMS.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Signer

type Signer interface {
	crypto.Signer

	RSAPublicKey() *rsa.PublicKey

	CreationTime() time.Time

	HashAlgo() crypto.Hash
}

Signer extends crypto.Signer to provide more key metadata.

func New

func New(api *cloudkms.Service, name string) (Signer, error)

New returns a crypto.Signer backed by the named Google Cloud KMS key.

func NewWithExplicitMetadata

func NewWithExplicitMetadata(api *cloudkms.Service, name string, hashAlgo crypto.Hash, creationTime time.Time) (Signer, error)

NewWithExplicitMetadata returns a crypto.Signer backed by the named Google Cloud KMS key, but doesn't need the "cloudkms.cryptoKeyVersions.get" permission which would otherwise be required for fetching the hash algorithm and creation time.

Jump to

Keyboard shortcuts

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