#!/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")"