Skip to content

Commit

Permalink
Better passphrases
Browse files Browse the repository at this point in the history
  • Loading branch information
NonlinearFruit committed Dec 31, 2023
1 parent b114323 commit e87574d
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion scripts/passphrase
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#!/usr/bin/env nu

def main [number_of_words?] {
def main [
--with-entropy
--as-json
--number-of-numbers: int # Number of single digit numbers in passphrase
number_of_words? # Number of words in passphrase
] {
let passphrase = ipsum --as-json ($number_of_words | default 1)
| from json
| str join '#'
Expand All @@ -9,3 +14,11 @@ def main [number_of_words?] {
echo $passphrase | clip copy
print "Copied!"
}

def random-number [] {
let max_int = 16777216
od -N3 -An -i /dev/urandom
| into int
| $in * 10 / $max_int
| math round
}

0 comments on commit e87574d

Please sign in to comment.