diff options
author | Nicolas Vigier <boklm@mageia.org> | 2011-02-03 11:36:18 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2011-02-03 11:36:18 +0000 |
commit | 9c79009ae82401e5489bf946c8635c3c5912432a (patch) | |
tree | dc5a2a5e448d1fce02111cbca7e1d7a91e8633d5 /random-passphrase | |
parent | ebb377748ce8ebd15d98ddfc21919c51ac40cffa (diff) | |
download | gpg-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-x | random-passphrase | 4 |
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--; } } |