materials

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: Apache-2.0 Imports: 14 Imported by: 9

Documentation

Index

Constants

View Source
const (
	EcPublicKeyField = "aws-crypto-public-key"
)

Variables

View Source
var (
	ErrCMM = errors.New("CMM error")
)

Functions

This section is empty.

Types

type BaseCache

type BaseCache interface {
	PutEncryptionEntry(cacheKey []byte, m model.EncryptionMaterials, n int) (*CacheEntry[model.EncryptionMaterials], error)
	PutDecryptionEntry(cacheKey []byte, m model.DecryptionMaterials) (*CacheEntry[model.DecryptionMaterials], error)
	GetEncryptionEntry(cacheKey []byte, n int) (*CacheEntry[model.EncryptionMaterials], error)
	GetDecryptionEntry(cacheKey []byte) (*CacheEntry[model.DecryptionMaterials], error)
}

type CacheEntry

type CacheEntry[V model.EncryptionMaterials | model.DecryptionMaterials] struct {
	// contains filtered or unexported fields
}

func NewCacheEntry

func NewCacheEntry[V model.EncryptionMaterials | model.DecryptionMaterials](key []byte, value V, lifetime time.Duration) *CacheEntry[V]

func (*CacheEntry[V]) Age

func (ce *CacheEntry[V]) Age() float64

func (*CacheEntry[V]) IsTooOld

func (ce *CacheEntry[V]) IsTooOld() bool

func (*CacheEntry[V]) Key

func (ce *CacheEntry[V]) Key() []byte

func (*CacheEntry[V]) Value

func (ce *CacheEntry[V]) Value() V

type CachingCryptoMaterialsManager

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

func (*CachingCryptoMaterialsManager) DecryptMaterials

func (*CachingCryptoMaterialsManager) GetEncryptionMaterials

func (*CachingCryptoMaterialsManager) GetInstance

type DefaultCryptoMaterialsManager

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

func (*DefaultCryptoMaterialsManager) DecryptMaterials

func (*DefaultCryptoMaterialsManager) GetEncryptionMaterials

func (*DefaultCryptoMaterialsManager) GetInstance

type MemoryCache

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

func (*MemoryCache) GetDecryptionEntry

func (mc *MemoryCache) GetDecryptionEntry(key []byte) (*CacheEntry[model.DecryptionMaterials], error)

func (*MemoryCache) GetEncryptionEntry

func (mc *MemoryCache) GetEncryptionEntry(key []byte, _ int) (*CacheEntry[model.EncryptionMaterials], error)

func (*MemoryCache) PutDecryptionEntry

func (mc *MemoryCache) PutDecryptionEntry(key []byte, dm model.DecryptionMaterials) (*CacheEntry[model.DecryptionMaterials], error)

func (*MemoryCache) PutEncryptionEntry

func (mc *MemoryCache) PutEncryptionEntry(key []byte, em model.EncryptionMaterials, _ int) (*CacheEntry[model.EncryptionMaterials], error)

Jump to

Keyboard shortcuts

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