Crypt::Random::Source::SSLeay - L<Net::SSLeay> support for


Crypt-Random-Source-SSLeay documentation Contained in the Crypt-Random-Source-SSLeay distribution.

Index


Code Index:

NAME

Top

Crypt::Random::Source::SSLeay - Net::SSLeay support for Crypt::Random::Source

SYNOPSIS

Top

	use Crypt::Random::Source::Strong::SSLeay;

	my $src = Crypt::Random::Source::Strong::SSLeay->new;

	my $random = $src->get(1024);

DESCRIPTION

Top

This module implements Net::SSLeay based random number generation for Crypt::Random::Source.

Net::SSLeay does not wrap the SSL api, and RAND_bytes is documented as being cryptographically strong, so Crypt::Random::Source::Strong::SSLeay is also provided (as opposed to the other OpenSSL based sources).

METHODS

Top

get

Get 10 random or pseudorandom bytes (depending on strength) from Net::SSLeay.

seed

Currently unimplemented, but Net::SSLeay documents RAND_add. Might be added in the future.

VERSION CONTROL

Top

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.

AUTHOR

Top

Yuval Kogman <nothingmuch@woobling.org>

COPYRIGHT

Top


Crypt-Random-Source-SSLeay documentation Contained in the Crypt-Random-Source-SSLeay distribution.

#!/usr/bin/perl

package Crypt::Random::Source::SSLeay;
use Moose;

extends qw(Crypt::Random::Source::Base);

use Net::SSLeay ();

our $VERSION = "0.02";

sub rank { 200 }

sub available { 1 }

sub seed {
	# RAND_add is documented but not implemented
	#my ( $self, @stuff ) = @_;
	#NET::SSLeay::RAND_add($_, length, 0) for @stuff;
}

__END__