pssht
latest
SSH server library written in PHP
Main Page
Classes
Files
File List
OpenSSL.php
1
<?php
2
3
/*
4
* This file is part of pssht.
5
*
6
* (c) François Poirotte <clicky@erebot.net>
7
*
8
* For the full copyright and license information, please view the LICENSE
9
* file that was distributed with this source code.
10
*/
11
12
namespace
fpoirotte\Pssht\Random
;
13
17
class
OpenSSL
implements
RandomInterface
18
{
20
public
function
__construct
()
21
{
22
}
23
24
public
function
getBytes
($count)
25
{
26
if
(!is_int($count) || $count <= 0) {
27
throw
new \InvalidArgumentException();
28
}
29
30
$value = openssl_random_pseudo_bytes($count, $strong);
31
33
if
(!$strong) {
34
;
35
}
36
return
$value;
37
}
38
}
fpoirotte\Pssht\Random\RandomInterface
Definition:
RandomInterface.php:17
fpoirotte\Pssht\Random\OpenSSL\__construct
__construct()
Construct a new PRNG.
Definition:
OpenSSL.php:20
fpoirotte\Pssht\Random
Definition:
Fixed.php:12
fpoirotte\Pssht\Random\OpenSSL
Definition:
OpenSSL.php:17
fpoirotte\Pssht\Random\OpenSSL\getBytes
getBytes($count)
Definition:
OpenSSL.php:24
src
Random
OpenSSL.php
Generated on Tue May 9 2017 12:09:56 for pssht by
1.8.11