summaryrefslogtreecommitdiff
path: root/src/pkg/crypto/rsa/pkcs1v15_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/crypto/rsa/pkcs1v15_test.go')
-rw-r--r--src/pkg/crypto/rsa/pkcs1v15_test.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pkg/crypto/rsa/pkcs1v15_test.go b/src/pkg/crypto/rsa/pkcs1v15_test.go
index 58d5fda19..bf9219bae 100644
--- a/src/pkg/crypto/rsa/pkcs1v15_test.go
+++ b/src/pkg/crypto/rsa/pkcs1v15_test.go
@@ -57,7 +57,7 @@ func TestDecryptPKCS1v15(t *testing.T) {
t.Errorf("#%d error decrypting", i)
}
want := []byte(test.out)
- if bytes.Compare(out, want) != 0 {
+ if !bytes.Equal(out, want) {
t.Errorf("#%d got:%#v want:%#v", i, out, want)
}
}
@@ -90,7 +90,7 @@ func TestEncryptPKCS1v15(t *testing.T) {
return false
}
- if bytes.Compare(plaintext, in) != 0 {
+ if !bytes.Equal(plaintext, in) {
t.Errorf("output mismatch: %#v %#v", plaintext, in)
return false
}
@@ -132,7 +132,7 @@ func TestEncryptPKCS1v15SessionKey(t *testing.T) {
t.Errorf("#%d error decrypting", i)
}
want := []byte(test.out)
- if bytes.Compare(key, want) != 0 {
+ if !bytes.Equal(key, want) {
t.Errorf("#%d got:%#v want:%#v", i, key, want)
}
}
@@ -176,7 +176,7 @@ func TestSignPKCS1v15(t *testing.T) {
}
expected, _ := hex.DecodeString(test.out)
- if bytes.Compare(s, expected) != 0 {
+ if !bytes.Equal(s, expected) {
t.Errorf("#%d got: %x want: %x", i, s, expected)
}
}