aboutsummaryrefslogtreecommitdiffstats
path: root/accounts/key.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-04-05 07:08:50 +0800
committerFelix Lange <fjl@twurst.com>2016-04-12 21:59:18 +0800
commit46df50be181afca503aff4a545e3f322ad04448b (patch)
treec969c79d6512bf1af4206c057497c23664bd131e /accounts/key.go
parent91aaddaeb38ff25118896fb436a938d14636760b (diff)
downloadgo-tangerine-46df50be181afca503aff4a545e3f322ad04448b.tar
go-tangerine-46df50be181afca503aff4a545e3f322ad04448b.tar.gz
go-tangerine-46df50be181afca503aff4a545e3f322ad04448b.tar.bz2
go-tangerine-46df50be181afca503aff4a545e3f322ad04448b.tar.lz
go-tangerine-46df50be181afca503aff4a545e3f322ad04448b.tar.xz
go-tangerine-46df50be181afca503aff4a545e3f322ad04448b.tar.zst
go-tangerine-46df50be181afca503aff4a545e3f322ad04448b.zip
accounts: improve API and add documentation
- Sign takes common.Address, not Account - Import/Export methods work with encrypted JSON keys
Diffstat (limited to 'accounts/key.go')
-rw-r--r--accounts/key.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/accounts/key.go b/accounts/key.go
index 668fa86a0..dbcb49dcf 100644
--- a/accounts/key.go
+++ b/accounts/key.go
@@ -146,9 +146,9 @@ func newKeyFromECDSA(privateKeyECDSA *ecdsa.PrivateKey) *Key {
return key
}
-// generate key whose address fits into < 155 bits so it can fit into
-// the Direct ICAP spec. for simplicity and easier compatibility with
-// other libs, we retry until the first byte is 0.
+// NewKeyForDirectICAP generates a key whose address fits into < 155 bits so it can fit
+// into the Direct ICAP spec. for simplicity and easier compatibility with other libs, we
+// retry until the first byte is 0.
func NewKeyForDirectICAP(rand io.Reader) *Key {
randBytes := make([]byte, 64)
_, err := rand.Read(randBytes)