Added passphrase generator script
This commit is contained in:
parent
cb108cb990
commit
d0291c2fb3
3
scripts/README.md
Normal file
3
scripts/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
This directory contains useful scripts and utilities that don't make sense to include as official Onionr features.
|
||||
|
||||
passphrase-generator.py: very simple utility to generate and print a strong passphrase to stdout. 256 bits of entropy by default.
|
21
scripts/passphrase-generator.py
Executable file
21
scripts/passphrase-generator.py
Executable file
@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
"""Generate a 16 word passphase with 256 bits of entropy.
|
||||
|
||||
Specify true to reduce to 128 bits"""
|
||||
|
||||
|
||||
import sys
|
||||
|
||||
import niceware
|
||||
|
||||
byte_count = 32 # 256 bits of entropy with niceware
|
||||
|
||||
arg = False
|
||||
try:
|
||||
arg = sys.argv[1].lower()
|
||||
if arg == 'true':
|
||||
byte_count = 16
|
||||
except IndexError: pass
|
||||
|
||||
print(' '.join(niceware.generate_passphrase(byte_count)))
|
Loading…
Reference in New Issue
Block a user