mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-03 04:26:20 -04:00
Rework mount folder structure
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
f8e9c70337
commit
7626765d87
7 changed files with 5 additions and 5 deletions
24
mount/kms/static.go
Normal file
24
mount/kms/static.go
Normal file
|
@ -0,0 +1,24 @@
|
|||
package kms
|
||||
|
||||
import (
|
||||
"context"
|
||||
)
|
||||
|
||||
// staticKMS is a KMS only returning keys containing of 0x41 bytes for every request.
|
||||
// Use for testing ONLY.
|
||||
type staticKMS struct{}
|
||||
|
||||
// NewStaticKMS creates a new StaticKMS.
|
||||
// Use for testing ONLY.
|
||||
func NewStaticKMS() *staticKMS {
|
||||
return &staticKMS{}
|
||||
}
|
||||
|
||||
// GetDEK returns the key of staticKMS.
|
||||
func (k *staticKMS) GetDEK(ctx context.Context, kekID, dekID string, dekSize int) ([]byte, error) {
|
||||
key := make([]byte, dekSize)
|
||||
for i := range key {
|
||||
key[i] = 0x41
|
||||
}
|
||||
return key, nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue