Initial commit of stable v1.0
This commit is contained in:
22
demo-makeotp.sh
Normal file
22
demo-makeotp.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
## zOTP Bash Demo for making a 6 digit OTP using Blake2 and being valid for 10 minutes
|
||||
|
||||
## Usage:
|
||||
## ./demo-makeotp.sh "{string-unique-to-user}"
|
||||
|
||||
declare thesalt="zOTP by Ze'ev Schurmann"
|
||||
|
||||
source zotp.inc.sh
|
||||
|
||||
if [[ -z "${1}" ]]; then
|
||||
echo "Usage:" >&2
|
||||
echo " $0 \"{string-unique-to-user}\"" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
declare theseed="${1}"
|
||||
|
||||
variablename="$(newOTP b2)"
|
||||
|
||||
echo "OTP is ${variablename} it will expire at $(date -d "+10 minutes")"
|
||||
Reference in New Issue
Block a user