Last active
March 17, 2016 22:23
-
-
Save davidhq/5413e67213f3c297db7b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
// "Fork" Geth | |
// add: | |
// func DecryptKeyFromFile(keysDirPath string, keyAddr common.Address, auth string) (keyBytes []byte, keyId []byte, err error) { | |
// return decryptKeyFromFile(keysDirPath, keyAddr, auth) | |
// } | |
// to crypto/key_store_passphrase.go | |
import ( | |
"fmt" | |
"github.com/ethereum/go-ethereum/crypto" | |
"github.com/ethereum/go-ethereum/common" | |
) | |
func main() { | |
var address = common.HexToAddress("6b2474fb5b7203acc098f5186e6bf5beacde9364") | |
var plainText, _, _ = crypto.DecryptKeyFromFile("/Users/david/Library/Ethereum/keystore/", address, "password") | |
fmt.Println(crypto.ToECDSA(plainText).D) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment