c8feb5c33d
The first secret is used to encrypt, the rest are for decryption; if the first doesn't work, the rest are tried in order. The makes it possible to rotate keys.
12 lines
205 B
Go
12 lines
205 B
Go
package db
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestNewPrivateKeySetRepoInvalidKey(t *testing.T) {
|
|
_, err := NewPrivateKeySetRepo(nil, []byte("sharks"))
|
|
if err == nil {
|
|
t.Fatalf("Expected non-nil error")
|
|
}
|
|
}
|