Created
June 16, 2014 15:16
-
-
Save maraoz/7dbbd94070c689286da3 to your computer and use it in GitHub Desktop.
brain wallets in bitcore
This file contains 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
var bitcore = require('bitcore'); | |
var password = 'an example of an insecure password'; | |
var privateKey = bitcore.util.sha256(password); | |
var key = new bitcore.Key(); | |
key.private = privateKey; | |
key.regenerateSync(); | |
var addr = new bitcore.Address.fromKey(key); | |
console.log("Brain wallet address: " + addr.toString()); | |
/* | |
Disclaimer: Brain wallets are not recommended for real bitcoins, unless you use a very strong password. | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
improve again cross seminar blade current hazard switch dutch country cube produce