]>
Commit | Line | Data |
---|---|---|
1abc2c0a DM |
1 | #!/usr/bin/perl |
2 | ||
3 | use strict; | |
4 | use warnings; | |
1abc2c0a | 5 | |
b08d9397 | 6 | use MIME::Base32; # libmime-base32-perl |
1abc2c0a | 7 | |
b08d9397 TL |
8 | open(my $RND_FH, '<', "/dev/urandom") or die "Unable to open '/dev/urandom' - $!"; |
9 | sysread($RND_FH, my $random_data, 10) == 10 or die "read random data failed - $!\n"; | |
10 | close $RND_FH or warn "Unable to close '/dev/urandom' - $!"; | |
11 | ||
12 | print MIME::Base32::encode_rfc3548($random_data) . "\n"; | |
13 | ||
14 | exit(0); |