mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-23 15:41:07 +02:00
24 lines
619 B
Go
24 lines
619 B
Go
// Copyright (c) HashiCorp, Inc.
|
|
// SPDX-License-Identifier: MPL-2.0
|
|
|
|
package keymanager
|
|
|
|
import (
|
|
"context"
|
|
|
|
wrapping "github.com/hashicorp/go-kms-wrapping/v2"
|
|
)
|
|
|
|
const (
|
|
KeyID = "root"
|
|
)
|
|
|
|
type KeyManager interface {
|
|
// Returns a wrapping.Wrapper which can be used to perform key-related operations.
|
|
Wrapper() wrapping.Wrapper
|
|
// RetrievalToken is the material returned which can be used to source back the
|
|
// encryption key. Depending on the implementation, the token can be the
|
|
// encryption key itself or a token/identifier used to exchange the token.
|
|
RetrievalToken(ctx context.Context) ([]byte, error)
|
|
}
|