aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/eth/eth.go
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/eth/eth.go')
-rw-r--r--crypto/eth/eth.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/crypto/eth/eth.go b/crypto/eth/eth.go
index edf50d3..975d8a8 100644
--- a/crypto/eth/eth.go
+++ b/crypto/eth/eth.go
@@ -104,6 +104,11 @@ func (pub PublicKey) Compress() []byte {
return pub.publicKey
}
+// Bytes returns the []byte representation of public key.
+func (pub PublicKey) Bytes() []byte {
+ return pub.Compress()
+}
+
// SigToPub returns the PublicKey that created the given signature.
func SigToPub(
hash common.Hash, signature crypto.Signature) (PublicKey, error) {