kmssign

package
v0.0.0-...-e2e270a Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KMSClient

type KMSClient interface {
	AsymmetricSign(ctx context.Context, req *kmspb.AsymmetricSignRequest, opts ...gax.CallOption) (*kmspb.AsymmetricSignResponse, error)
	GetPublicKey(ctx context.Context, req *kmspb.GetPublicKeyRequest, opts ...gax.CallOption) (*kmspb.PublicKey, error)
}

type Key

type Key struct {
	// contains filtered or unexported fields
}

func NewKey

func NewKey(ctx context.Context, client KMSClient, name string) (*Key, error)

func NewPrivateKey

func NewPrivateKey(client KMSClient, name string, hash crypto.Hash) *Key

func (*Key) HashFunc

func (k *Key) HashFunc() crypto.Hash

func (*Key) Public

func (k *Key) Public() crypto.PublicKey

func (*Key) Sign

func (k *Key) Sign(rand io.Reader, digest []byte, opts crypto.SignerOpts) ([]byte, error)

func (*Key) Verify

func (k *Key) Verify(digest, sig []byte) bool

type SignerOpts

type SignerOpts interface {
	crypto.SignerOpts

	Context() context.Context
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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