mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-30 19:51:58 +00:00
Merge pull request #53 from tendermint/constant-time-equals
Constant time equals
This commit is contained in:
@@ -87,8 +87,8 @@ func (sig SignatureSecp256k1) IsZero() bool { return len(sig) == 0 }
|
||||
func (sig SignatureSecp256k1) String() string { return fmt.Sprintf("/%X.../", Fingerprint(sig[:])) }
|
||||
|
||||
func (sig SignatureSecp256k1) Equals(other Signature) bool {
|
||||
if otherEd, ok := other.Unwrap().(SignatureSecp256k1); ok {
|
||||
return bytes.Equal(sig[:], otherEd[:])
|
||||
if otherSecp, ok := other.Unwrap().(SignatureSecp256k1); ok {
|
||||
return bytes.Equal(sig[:], otherSecp[:])
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
|
Reference in New Issue
Block a user