generateRandomKey() public method
Generates specified number of random bytes.
Note that output may not be ASCII.
See also generateRandomString() if you need a string.
| public string generateRandomKey ( $length = 32 ) | ||
|---|---|---|
| $length | integer |
The number of bytes to generate |
| return | string |
The generated random bytes |
| throws | yii\base\InvalidParamException |
if wrong length is specified |
| throws | yii\base\Exception |
on failure. |
Please login to continue.