#!/bin/sh [ -n "${0%/*}" ] && cd "${0%/*}" . ./lib.sh if [ ! -x ../otpcli ]; then plan 0 "skip: build otpcli first" exit 1 fi plan 6 # base32("12345678901234567890123456789012") key=GEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQGEZDGNBVGY3TQOJQGEZA check "time 59" 46119246 ../otpcli -d 8 -a sha256 -T 59 "$key" check "time 1111111109" 68084774 ../otpcli -d 8 -a sha256 -T 1111111109 "$key" check "time 1111111111" 67062674 ../otpcli -d 8 -a sha256 -T 1111111111 "$key" check "time 1234567890" 91819424 ../otpcli -d 8 -a sha256 -T 1234567890 "$key" check "time 2000000000" 90698825 ../otpcli -d 8 -a sha256 -T 2000000000 "$key" check "time 20000000000" 77737706 ../otpcli -d 8 -a sha256 -T 20000000000 "$key"