Skip to content

Commit

Permalink
crypto/ecies: remove unused function (ethereum#19096)
Browse files Browse the repository at this point in the history
  • Loading branch information
gzliudan committed Dec 2, 2024
1 parent a5ecfd8 commit 737bb32
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions crypto/ecies/ecies_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,19 +91,6 @@ func cmpPublic(pub1, pub2 PublicKey) bool {
return bytes.Equal(pub1Out, pub2Out)
}

// cmpPrivate returns true if the two private keys are the same.
func cmpPrivate(prv1, prv2 *PrivateKey) bool {
if prv1 == nil || prv1.D == nil {
return false
} else if prv2 == nil || prv2.D == nil {
return false
} else if prv1.D.Cmp(prv2.D) != 0 {
return false
} else {
return cmpPublic(prv1.PublicKey, prv2.PublicKey)
}
}

// Validate the ECDH component.
func TestSharedKey(t *testing.T) {
prv1, err := GenerateKey(rand.Reader, DefaultCurve, nil)
Expand Down

0 comments on commit 737bb32

Please sign in to comment.