Skip to content

Instantly share code, notes, and snippets.

@maraoz
Created June 16, 2014 15:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save maraoz/7dbbd94070c689286da3 to your computer and use it in GitHub Desktop.
Save maraoz/7dbbd94070c689286da3 to your computer and use it in GitHub Desktop.
brain wallets in bitcore
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.
*/
@HasanRasoli6582
Copy link

improve again cross seminar blade current hazard switch dutch country cube produce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment