Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/woodruffw/nist-beacon
A perl module for interacting with NIST's randomness beacon.
https://github.com/woodruffw/nist-beacon
nist-randomness-beacon perl
Last synced: 3 months ago
JSON representation
A perl module for interacting with NIST's randomness beacon.
- Host: GitHub
- URL: https://github.com/woodruffw/nist-beacon
- Owner: woodruffw
- License: other
- Created: 2014-11-26T17:13:16.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-04-28T20:29:51.000Z (over 9 years ago)
- Last Synced: 2023-08-02T04:44:14.541Z (over 1 year ago)
- Topics: nist-randomness-beacon, perl
- Language: Perl
- Homepage: http://search.cpan.org/~woodruffw/NIST-Beacon/lib/NIST/Beacon.pm
- Size: 164 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.mkdn
- License: LICENSE
Awesome Lists containing this project
README
# NAME
NIST::Beacon - A Perl module for querying NIST's randomness beacon.
# VERSION
version 1.002
# SYNOPSIS
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";# DESCRIPTION
NIST::Beacon provides a perl interface to the REST API of the [NIST randomness beacon](https://beacon.nist.gov/home).
## Methods
- `latest_record`
Returns a [NIST::Beacon::Record](https://metacpan.org/pod/NIST::Beacon::Record) object containing the latest record
emitted by the NIST beacon.
Returns `undef` if a network failure occurs.- `previous_record(timestamp)`
Returns a [NIST::Beacon::Record](https://metacpan.org/pod/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.- `current_record(timestamp)`
Returns a [NIST::Beacon::Record](https://metacpan.org/pod/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](https://metacpan.org/pod/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.# SEE ALSO
[NIST::Beacon::Record](https://metacpan.org/pod/NIST::Beacon::Record)
# AUTHOR
William Woodruff
# COPYRIGHT AND LICENSE
This software is Copyright (c) 2015 by William Woodruff.
This is free software, licensed under:
The MIT (X11) License