oathkeygen: code style fixes

we probably should just deprecate this altogether as it could be
worked around by doing a simple

 dd if=/dev/urandom bs=1 count=10 status=none | base32

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2023-04-11 15:13:43 +02:00
parent f0595d158e
commit 357ae0959f

View File

@ -5,7 +5,7 @@ use warnings;
use MIME::Base32; #libmime-base32-perl use MIME::Base32; #libmime-base32-perl
my $test; my $test;
open(RND, "/dev/urandom"); open(my $RND_FH, '<', "/dev/urandom");
sysread(RND, $test, 10) == 10 || die "read random data failed\n"; sysread($RND_FH, $test, 10) == 10 || die "read random data failed - $!\n";
print MIME::Base32::encode_rfc3548($test) . "\n"; print MIME::Base32::encode_rfc3548($test) . "\n";