keyutils

package
v1.17.0 Latest Latest
Warning

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

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

Documentation

Overview

Package keyutils provides helpers for working with ECDSA public keys.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodePublicKey

func EncodePublicKey(publicKey crypto.PublicKey) (string, error)

EncodePublicKey returns the base64 encoded PEM block.

Types

type PublicKeyCache

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

func NewPublicKeyCache

func NewPublicKeyCache(ctx context.Context, cacher cache.Cacher, ttl time.Duration) (*PublicKeyCache, error)

NewPublicKeyCache creates a new public key cache from the given parameters.

func (*PublicKeyCache) GetPublicKey

func (c *PublicKeyCache) GetPublicKey(ctx context.Context, id string, kms keys.KeyManager) (crypto.PublicKey, error)

GetPublicKey returns the public key for the provided ID.

Jump to

Keyboard shortcuts

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