Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-p2p-core
Commits
543dbe6c
Commit
543dbe6c
authored
Aug 01, 2019
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nit: simplify equality check
parent
963cc997
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
8 deletions
+1
-8
crypto/rsa_go.go
crypto/rsa_go.go
+1
-8
No files found.
crypto/rsa_go.go
View file @
543dbe6c
...
@@ -109,14 +109,7 @@ func (sk *RsaPrivateKey) Equals(k Key) bool {
...
@@ -109,14 +109,7 @@ func (sk *RsaPrivateKey) Equals(k Key) bool {
b
:=
other
.
sk
b
:=
other
.
sk
// Don't care about constant time. We're only comparing the public half.
// Don't care about constant time. We're only comparing the public half.
if
a
.
PublicKey
.
N
.
Cmp
(
b
.
PublicKey
.
N
)
!=
0
{
return
a
.
PublicKey
.
N
.
Cmp
(
b
.
PublicKey
.
N
)
==
0
&&
a
.
PublicKey
.
E
==
b
.
PublicKey
.
E
return
false
}
if
a
.
PublicKey
.
E
!=
b
.
PublicKey
.
E
{
return
false
}
return
true
}
}
// UnmarshalRsaPrivateKey returns a private key from the input x509 bytes
// UnmarshalRsaPrivateKey returns a private key from the input x509 bytes
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment