Documentation ¶
Overview ¶
Package localkms contains a KMS implementation that uses Google's Tink crypto library. Private keys may intermittently reside in local memory with this implementation so keep this consideration in mind when deciding whether to use this or not.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AriesCryptoWrapper ¶
type AriesCryptoWrapper struct {
// contains filtered or unexported fields
}
AriesCryptoWrapper wraps aries crypto implementations to conform api.Crypto interface.
func NewAriesCryptoWrapper ¶
func NewAriesCryptoWrapper(cryptosKMS kms.KeyManager, wrappedCrypto crypto.Crypto) *AriesCryptoWrapper
NewAriesCryptoWrapper returns new instance of AriesCryptoWrapper.
type InMemoryStorageProvider ¶
InMemoryStorageProvider represents an in-memory storage provide that can be used to satisfy the Aries KMS Provider interface.
func NewInMemoryStorageProvider ¶
func NewInMemoryStorageProvider() *InMemoryStorageProvider
NewInMemoryStorageProvider returns a new InMemoryStorageProvider.
func (*InMemoryStorageProvider) SecretLock ¶
func (p *InMemoryStorageProvider) SecretLock() secretlock.Service
SecretLock returns the Aries no-op secretlock.Service implementation.
func (*InMemoryStorageProvider) StorageProvider ¶
func (p *InMemoryStorageProvider) StorageProvider() arieskms.Store
StorageProvider returns an in-memory arieskms.Store implemenation.
type InMemoryStore ¶
type InMemoryStore struct {
// contains filtered or unexported fields
}
InMemoryStore represents an in-memory database of keysets.
func NewInMemoryStore ¶
func NewInMemoryStore() *InMemoryStore
NewInMemoryStore returns a new InMemoryStore.
func (*InMemoryStore) Delete ¶
func (k *InMemoryStore) Delete(keysetID string) error
Delete deletes the key stored under the given keysetID.
type LocalKMS ¶
type LocalKMS struct {
// contains filtered or unexported fields
}
LocalKMS is a KMS implementation that uses Google's Tink crypto library. Private keys may intermittently reside in local memory with this implementation so keep this consideration in mind when deciding whether to use this or not.
func NewLocalKMS ¶
NewLocalKMS returns a new Local KMS.
func (*LocalKMS) Create ¶
Create creates a keyset of the given keyType and then writes it to storage. The keyID and raw public key bytes of the newly generated keyset are returned.
func (*LocalKMS) ExportPubKey ¶
ExportPubKey returns the public key associated with the given keyID as raw bytes.
func (*LocalKMS) GetAriesKMS
deprecated
func (k *LocalKMS) GetAriesKMS() *arieslocalkms.LocalKMS
GetAriesKMS returns the underlying Aries local KMS instance.
Deprecated: This method will be removed in a future version.