GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
OpenXPKI::Random(3) User Contributed Perl Documentation OpenXPKI::Random(3)

Return random numbers safe for cryptographic use

https://www.xkcd.com/221/

If your system provides /dev/urandom there is no need for any configuration.

If you want to use another random source, add the following to the config:

    system:
        random:
            socket:
                location: '/dev/myentropypool'

The source need to be a socket that returns a stream of bytes. If you set location to the empty string, the class will use the system tokens get_random call instead.

The call expects three positional parameters:
Int random number of bytes
The number of random bytes, this is NOT the length of the string received. This argument is mandatory.
base64|hex|bin
The encoding of the returned data. The default is base64.
fast|regular|strong
The default uses /dev/urandom which should be sufficient for everyday use such as passwords or UUIDs. fast might return insecure numbers, string will call the default tokens create_random method which calls openssl rand which CAN be setup using an engine / HSM.

Note: fast has currently no extra implementation and uses /dev/urandom.

2022-05-14 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.