-
-
Save eliooses/ce2f50ed1e14bf0408ab 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
| // Bitcoin in Depth: A Cryptographycal Journey | |
| // JCC 2014 | |
| //Importo librerías | |
| var bitcoin = require('bitcoinjs-lib'); | |
| var colors = require('colors'); | |
| //Creo el par clave pública/privada usando | |
| //criptografía asimétrica, particularmente Curva Elíptica | |
| var key = bitcoin.ECKey.makeRandom(); | |
| console.log(''); | |
| //Muestro la llave privada por pantalla | |
| console.log("Clave privada: "+key.toWIF().red); | |
| //Muestro la dirección pública asociada | |
| //que voy a usar en caso de querer recibir Bitcoin | |
| console.log("Billetera pública: "+key.pub.getAddress().toString().green) | |
| console.log(''); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment