From 135226b7ad771e499fd322f410a0d151c9f3b1ed Mon Sep 17 00:00:00 2001 From: Felix Van der Jeugt Date: Thu, 27 Aug 2015 06:34:48 +0200 Subject: [PATCH] pwcalc - add terminal version for non-x environment --- local/bin/twpcalc.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 local/bin/twpcalc.sh diff --git a/local/bin/twpcalc.sh b/local/bin/twpcalc.sh new file mode 100755 index 0000000..a44d2c1 --- /dev/null +++ b/local/bin/twpcalc.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# Reading input {{{ + +# Terminal +read -p "Alias: " alias_ +read -s -p "Secret: " secret + +echo -n "$secret$alias_" | shasum | xxd -r -p | base64 | colrm 17 +