aboutsummaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorJoseph Richey <joerichey@google.com>2017-07-18 10:59:40 -0700
committerGitHub <noreply@github.com>2017-07-18 10:59:40 -0700
commit8867856db45abaed8b9e2539ee7c34d99360db56 (patch)
tree5895bce36a9dff465057d84819b0d65255e1c702 /crypto
parent3d08d9f6891db3ca94337e9b987ef62cba535fe1 (diff)
parent17f7dd867d0fd450377c6862c0782483d39ae408 (diff)
Merge pull request #22 from google/fix
Fixing fscrypt build system
Diffstat (limited to 'crypto')
-rw-r--r--crypto/crypto_test.go17
1 files changed, 9 insertions, 8 deletions
diff --git a/crypto/crypto_test.go b/crypto/crypto_test.go
index 5655fef..a154fbf 100644
--- a/crypto/crypto_test.go
+++ b/crypto/crypto_test.go
@@ -48,14 +48,15 @@ func makeKey(b byte, n int) (*Key, error) {
return NewFixedLengthKeyFromReader(ConstReader(b), n)
}
-var fakeValidDescriptor = "0123456789abcdef"
-var fakeInvalidDescriptor = "123456789abcdef"
-var fakeSalt = bytes.Repeat([]byte{'a'}, metadata.SaltLen)
-var fakePassword = []byte("password")
-
-var fakeValidPolicyKey, _ = makeKey(42, metadata.PolicyKeyLen)
-var fakeInvalidPolicyKey, _ = makeKey(42, metadata.PolicyKeyLen-1)
-var fakeWrappingKey, _ = makeKey(17, metadata.InternalKeyLen)
+var (
+ fakeValidDescriptor = "0123456789abcdef"
+ fakeSalt = bytes.Repeat([]byte{'a'}, metadata.SaltLen)
+ fakePassword = []byte("password")
+
+ fakeValidPolicyKey, _ = makeKey(42, metadata.PolicyKeyLen)
+ fakeInvalidPolicyKey, _ = makeKey(42, metadata.PolicyKeyLen-1)
+ fakeWrappingKey, _ = makeKey(17, metadata.InternalKeyLen)
+)
// As the passpharase hashing function clears the passphrase, we need to make
// a new passphrase key for each test