From 9c79009ae82401e5489bf946c8635c3c5912432a Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Thu, 3 Feb 2011 11:36:18 +0000 Subject: - print passphrase in hex (as ssss doesn't like binary files) - limit to 100 bytes (as ssss only accepts 128) --- random-passphrase | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'random-passphrase') 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--; } } -- cgit v1.2.1