The Random\Engine\Secure class
(PHP 8 >= 8.2.0)
Introduction
Generates cryptographically secure randomness using the operating system’s CSPRNG.
The randomness generated by this Random\Engine is suitable for all applications, including the generation of long-term secrets, such as encryption keys.
The Random\Engine\Secure engine is the recommended safe default choice, unless the application requires either reproducible sequences or very high performance.
Class synopsis
namespace Random\Engine;
/* Methods */
}
Table of Contents
- Random\Engine\Secure::generate — Generate cryptographically secure randomness
来源:PHP Documentation Group · 作者与贡献记录 · CC BY 3.0。离线整理了版式、链接和媒体显示。
