aboutsummaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorJoe Richey joerichey@google.com <joerichey@google.com>2017-07-17 23:16:00 -0700
committerJoe Richey joerichey@google.com <joerichey@google.com>2017-07-17 23:16:00 -0700
commit744dbff34969ef612b219cde5b8f116f3ae3d26f (patch)
tree924ecc4db650e2161a47916ddff5d455315251a1 /crypto
parent26b8a7195a3fa09ea1e6a8187e5785dd6d5245cd (diff)
Small fixes so "make lint" doesn't complain.
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