---
name: "Crypt::Random::Source::Factory"
section: "3pm"
platform: "linux"
package: "libcrypt-random-source-perl"
version: "0.14-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Crypt::Random::Source::Factory"
---

# Crypt::Random::Source::Factory(3pm)

Load and instantiate sources of random data

## NAME

Crypt::Random::Source::Factory - Load and instantiate sources of random data

## VERSION

version 0.14

## SYNOPSIS

```
    use Crypt::Random::Source::Factory;
    my $f = Crypt::Random::Source::Factory->new;
    my $strong = $f->get_strong;
    my $weak = $f->get_weak;
    my $any = $f->get;
```

## DESCRIPTION

This class implements a loading and instantiation factory for Crypt::Random::Source objects.

If `$ENV{CRYPT_RANDOM_NOT_PLUGGABLE}` is set then only a preset list of sources will be tried. Otherwise Module::Find will be used to locate any installed sources, and use the first available one.

## METHODS

### get %args

Instantiate any random source, passing `%args` to the constructor.

The `"type"` argument can be `"weak"`, `"strong"` or `"any"`.

### get\_weak %args

### get\_strong %args

Instantiate a new weak or strong random source.

## SUPPORT

Bugs may be submitted through the RT bug tracker \<https://rt.cpan.org/Public/Dist/Display.html?Name=Crypt-Random-Source\> (or bug-Crypt-Random-Source@rt.cpan.org \<mailto:bug-Crypt-Random-Source@rt.cpan.org\>).

## AUTHOR

XXXX XXX'XX (Yuval Kogman) \<nothingmuch@woobling.org\>

## COPYRIGHT AND LICENCE

This software is copyright (c) 2008 by Yuval Kogman.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
