pve-access-control/oathkeygen
Wolfgang Bumiller 03e2a71e3d don't import 'RFC' from MIME::Base32
call encode_rfc3548 explicitly instead as newer versions of
the base32 package will drop this import scheme (stretch)
2016-07-26 15:02:49 +02:00

12 lines
237 B
Perl
Executable File

#!/usr/bin/perl
use strict;
use warnings;
use MIME::Base32; #libmime-base32-perl
my $test;
open(RND, "/dev/urandom");
sysread(RND, $test, 10) == 10 || die "read randon data failed\n";
print MIME::Base32::encode_rfc3548($test) . "\n";