Commit 952fe3a4 authored by Xavier Guimard's avatar Xavier Guimard

Add little TOTP test script (#1359)

parent 42d53cec
#!/usr/bin/perl -w
use Authen::OATH;
use Convert::Base32 qw( decode_base32 );
unless ( $ARGV[0] ) {
print STDERR "Usage $0 <totp-secret>\n";
exit 1;
my $oath = Authen::OATH->new();
my $totp = $oath->totp( decode_base32( $ARGV[0] ) );
print "$totp\n";
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment