| ユーザフォーラムで議論/質問 | マニュアル検索 | ハイライト | ハイライトオフ | ポータル | php spot |
random_bytes(PHP 7) random_bytes — Generates cryptographically secure pseudo-random bytes 説明
string random_bytes
( int
$length
)Generates an arbitrary length string of cryptographic random bytes that are suitable for cryptographic use, such as when generating salts, keys or initialization vectors. この関数が使う不規則性のソースはつぎのとおりです。
パラメータ
返り値Returns a string containing the requested number of cryptographically secure random bytes. エラー / 例外例例1 random_bytes() example
<?php 上の例の出力は、 たとえば以下のようになります。 string(10) "385e33f741" 参考
|
各種マニュアル:
PHPマニュアル |
PEARマニュアル |
Smarty(英語)マニュアル |
PHP-GTKマニュアル |
「random_bytes - Generates cryptographically secure pseudo-random bytes」をGoogle検索
|