Rework mount folder structure

Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
Daniel Weiße 2022-03-24 15:17:57 +01:00 committed by Daniel Weiße
parent f8e9c70337
commit 7626765d87
7 changed files with 5 additions and 5 deletions

24
mount/kms/static.go Normal file
View 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
}