aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xgenerate-key3
-rwxr-xr-xrandom-passphrase6
2 files changed, 4 insertions, 5 deletions
diff --git a/generate-key b/generate-key
index d41a90c..3329472 100755
--- a/generate-key
+++ b/generate-key
@@ -7,6 +7,7 @@ date
echo '(check if the date is correct and press enter)'
read z
+mkdir -p "$GPGHOMEDIR"
chmod 700 "$GPGHOMEDIR"
echo "Generate key :"
@@ -28,5 +29,5 @@ echo "Generate passphrase"
gpg -c --passphrase-file "$passphrase" "$seckey"
rm -f "$seckey"
-#TODO : split secret key using ssss-split
+./split-passphrase
diff --git a/random-passphrase b/random-passphrase
index 777f10c..0bb2f02 100755
--- a/random-passphrase
+++ b/random-passphrase
@@ -10,10 +10,8 @@ while ($size) {
my $o;
print STDERR "$size random bytes to read.\n";
read $rf, $o, 1;
- if ($o ne "\n" && $o ne "\r") {
- print unpack("H*", $o);
- $size--;
- }
+ print unpack("H*", $o);
+ $size--;
}
close($rf);