diff options
author | Felix Lange <fjl@twurst.com> | 2016-04-05 07:08:50 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2016-04-12 21:59:18 +0800 |
commit | 46df50be181afca503aff4a545e3f322ad04448b (patch) | |
tree | c969c79d6512bf1af4206c057497c23664bd131e /accounts/key.go | |
parent | 91aaddaeb38ff25118896fb436a938d14636760b (diff) | |
download | dexon-46df50be181afca503aff4a545e3f322ad04448b.tar.gz dexon-46df50be181afca503aff4a545e3f322ad04448b.tar.zst dexon-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.go | 6 |
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) |