forked from cerc-io/plugeth
crypto/ecies: remove unused function (#19096)
This commit is contained in:
parent
f57c80d22e
commit
2a0e1bb32b
@ -93,19 +93,6 @@ func cmpPublic(pub1, pub2 PublicKey) bool {
|
|||||||
return bytes.Equal(pub1Out, pub2Out)
|
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.
|
// Validate the ECDH component.
|
||||||
func TestSharedKey(t *testing.T) {
|
func TestSharedKey(t *testing.T) {
|
||||||
prv1, err := GenerateKey(rand.Reader, DefaultCurve, nil)
|
prv1, err := GenerateKey(rand.Reader, DefaultCurve, nil)
|
||||||
|
Loading…
Reference in New Issue
Block a user