You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
496 B
26 lines
496 B
6 years ago
|
/*!
|
||
|
* scripts/generate_passphrase.js
|
||
|
* Copyright © 2019 – Katana Cryptographic Ltd. All Rights Reserved.
|
||
|
*/
|
||
|
'use strict'
|
||
|
|
||
|
const bip39 = require('bip39')
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Script generating a strong random passphrase (128-bits of entropy)
|
||
|
* Useful for the generation of a strong api key or oa strong jwt secret (see /keys/index-example.js).
|
||
|
*/
|
||
|
|
||
|
function run() {
|
||
|
const mnemonic = bip39.generateMnemonic()
|
||
|
console.log(`Generated passphrase = ${mnemonic}`)
|
||
|
}
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Launch the script
|
||
|
*/
|
||
|
run()
|
||
|
|