NIST::Beacon - A Perl module for querying NIST's randomness beacon.
version 1.002
use NIST::Beacon; my $beacon = NIST::Beacon->new; my $record = $beacon->latest_record; print "The latest sequence generated by the NIST beacon is: \n"; print $record->current, "\n";
NIST::Beacon provides a perl interface to the REST API of the NIST randomness beacon.
latest_record
Returns a NIST::Beacon::Record object containing the latest record emitted by the NIST beacon. Returns undef if a network failure occurs.
undef
previous_record(timestamp)
Returns a NIST::Beacon::Record object containing the record emitted immediately prior to the record emitted at timestamp. timestamp must be in Unix timestamp format. If no timestamp is given, the current time is assumed. Returns undef if a network failure occurs or no record exists.
timestamp
current_record(timestamp)
Returns a NIST::Beacon::Record object containing the record emitted at timestamp. timestamp must be in Unix timestamp format. If no timestamp is given, the current time minus one minuted is assumed (to avoid querying a record that has not yet been generated). Returns undef if a network failure occurs or no record exists.
next_record(timestamp)
Returns a NIST::Beacon::Record object containing the record emitted immediately after the record emitted at timestamp. timestamp must be in Unix timestamp format. Returns undef if no timestamp is given or if the timestamp is in the future.
NIST::Beacon::Record
William Woodruff <william@tuffbizz.com>
This software is Copyright (c) 2015 by William Woodruff.
This is free software, licensed under:
The MIT (X11) License
To install NIST::Beacon, copy and paste the appropriate command in to your terminal.
cpanm
cpanm NIST::Beacon
CPAN shell
perl -MCPAN -e shell install NIST::Beacon
For more information on module installation, please visit the detailed CPAN module installation guide.