Recommend this page to a friend! |
Classes of Martin Latter | PHP Random Bytes | README.md | Download |
|
DownloadRandom BytesGenerate cryptographically-strong random bytes.PurposeCreate random bytes – as cryptographically-strong as possible – from available sources of entropy, and display in different output formats. Crypto Sources
Random Bytes Definitions:
UsagePrototype
Example
DetailsThe random bytes generated are only as good as the underlying entropy generator of the OS. Linux's /dev/urandom entropy source is a non-blocking generator 'suitable for most cryptographic purposes'. (/dev/random, being blocking, isn't suitable for this script.) OpenBSD and FreeBSD have non-blocking /dev/random implementations. The LicenseRandom Bytes is released under the GPL v.3. |