| Crypt-Random-Source-Weak-OpenSSLRand documentation | Contained in the Crypt-Random-Source-Weak-OpenSSLRand distribution. |
Crypt::Random::Source::Weak::OpenSSLRand - Use OpenSSL::Rand as a Crypt::Random::Source
use Crypt::Random::Source::Weak::OpenSSLRand; my $source = Crypt::Random::Source::Weak::OpenSSLRand->new; my $ten_bytes = $source->get(10);
This module is a Crypt::Random::Source plugin that provides OpenSSL::Rand support.
Calls randbytes.
Crypt::Random::Source, OpenSSL, OpenSSL::Rand
This module is maintained using Darcs. You can get the latest version from
http://nothingmuch.woobling.org/code, and use darcs send to commit
changes.
Yuval Kogman <nothingmuch@woobling.org>
Copyright (c) 2008 Yuval Kogman. All rights reserved This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Crypt-Random-Source-Weak-OpenSSLRand documentation | Contained in the Crypt-Random-Source-Weak-OpenSSLRand distribution. |
#!/usr/bin/perl package Crypt::Random::Source::Weak::OpenSSLRand; use Squirrel; use OpenSSL::Rand qw(randbytes); use namespace::clean -except => [qw(meta)]; extends qw( Crypt::Random::Source::Weak Crypt::Random::Source::Base ); our $VERSION = "0.01"; sub available { 1 } sub rank { 200 } # not too shabby if you can get it installed sub get { my ( $self, $n ) = @_; randbytes($n); } __PACKAGE__ __END__