Versions in this module Expand all Collapse all v0 v0.0.1 Jan 25, 2016 Changes in this version + const LightScryptN + const LightScryptP + const StandardScryptN + const StandardScryptP + func CreateAddress(b common.Address, nonce uint64) common.Address + func Decrypt(prv *ecdsa.PrivateKey, ct []byte) ([]byte, error) + func Ecrecover(hash, sig []byte) ([]byte, error) + func Encrypt(pub *ecdsa.PublicKey, message []byte) ([]byte, error) + func FromECDSA(prv *ecdsa.PrivateKey) []byte + func FromECDSAPub(pub *ecdsa.PublicKey) []byte + func GenerateKey() (*ecdsa.PrivateKey, error) + func HexToECDSA(hexkey string) (*ecdsa.PrivateKey, error) + func ImportBlockTestKey(privKeyBytes []byte) error + func LoadECDSA(file string) (*ecdsa.PrivateKey, error) + func PKCS7Unpad(in []byte) []byte + func PubkeyToAddress(p ecdsa.PublicKey) common.Address + func Ripemd160(data []byte) []byte + func SaveECDSA(file string, key *ecdsa.PrivateKey) error + func Sha256(data []byte) []byte + func Sha3(data ...[]byte) []byte + func Sha3Hash(data ...[]byte) (h common.Hash) + func SigToPub(hash, sig []byte) (*ecdsa.PublicKey, error) + func Sign(hash []byte, prv *ecdsa.PrivateKey) (sig []byte, err error) + func ToECDSA(prv []byte) *ecdsa.PrivateKey + func ToECDSAPub(pub []byte) *ecdsa.PublicKey + func ValidateSignatureValues(v byte, r, s *big.Int) bool + type Key struct + Address common.Address + Id uuid.UUID + PrivateKey *ecdsa.PrivateKey + func GenerateNewKeyDefault(ks KeyStore, rand io.Reader, auth string) (key *Key, err error) + func ImportPreSaleKey(keyStore KeyStore, keyJSON []byte, password string) (*Key, error) + func NewKey(rand io.Reader) *Key + func NewKeyForDirectICAP(rand io.Reader) *Key + func NewKeyFromECDSA(privateKeyECDSA *ecdsa.PrivateKey) *Key + func (k *Key) MarshalJSON() (j []byte, err error) + func (k *Key) UnmarshalJSON(j []byte) (err error) + type KeyStore interface + Cleanup func(keyAddr common.Address) (err error) + DeleteKey func(common.Address, string) error + GenerateNewKey func(io.Reader, string) (*Key, error) + GetKey func(common.Address, string) (*Key, error) + GetKeyAddresses func() ([]common.Address, error) + StoreKey func(*Key, string) error + func NewKeyStorePassphrase(path string, scryptN int, scryptP int) KeyStore + func NewKeyStorePlain(path string) KeyStore