aboutsummaryrefslogtreecommitdiffstats
path: root/random-passphrase
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2011-02-03 11:36:18 +0000
committerNicolas Vigier <boklm@mageia.org>2011-02-03 11:36:18 +0000
commit9c79009ae82401e5489bf946c8635c3c5912432a (patch)
treedc5a2a5e448d1fce02111cbca7e1d7a91e8633d5 /random-passphrase
parentebb377748ce8ebd15d98ddfc21919c51ac40cffa (diff)
downloadgpg-9c79009ae82401e5489bf946c8635c3c5912432a.tar
gpg-9c79009ae82401e5489bf946c8635c3c5912432a.tar.gz
gpg-9c79009ae82401e5489bf946c8635c3c5912432a.tar.bz2
gpg-9c79009ae82401e5489bf946c8635c3c5912432a.tar.xz
gpg-9c79009ae82401e5489bf946c8635c3c5912432a.zip
- print passphrase in hex (as ssss doesn't like binary files)
- limit to 100 bytes (as ssss only accepts 128)
Diffstat (limited to 'random-passphrase')
-rwxr-xr-xrandom-passphrase4
1 files changed, 2 insertions, 2 deletions
diff --git a/random-passphrase b/random-passphrase
index 2673e34..777f10c 100755
--- a/random-passphrase
+++ b/random-passphrase
@@ -1,7 +1,7 @@
#!/usr/bin/perl -w
use strict;
-my $size = 200;
+my $size = 100;
binmode(STDOUT, ":utf8");
@@ -11,7 +11,7 @@ while ($size) {
print STDERR "$size random bytes to read.\n";
read $rf, $o, 1;
if ($o ne "\n" && $o ne "\r") {
- print $o;
+ print unpack("H*", $o);
$size--;
}
}