mirror of
https://github.com/guanzhi/GmSSL.git
synced 2026-05-11 10:56:17 +08:00
Add PHP Extension for GmSSL
View http://gmssl.org/docs/php-api.html for more info.
This commit is contained in:
22
php/ext/openssl/tests/openssl_random_pseudo_bytes_basic.phpt
Normal file
22
php/ext/openssl/tests/openssl_random_pseudo_bytes_basic.phpt
Normal file
@@ -0,0 +1,22 @@
|
||||
--TEST--
|
||||
openssl_random_pseudo_bytes() tests
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("openssl")) print "skip"; ?>
|
||||
--FILE--
|
||||
<?php
|
||||
for ($i = 0; $i < 10; $i++) {
|
||||
var_dump(bin2hex(openssl_random_pseudo_bytes($i, $strong)));
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
string(0) ""
|
||||
string(2) "%s"
|
||||
string(4) "%s"
|
||||
string(6) "%s"
|
||||
string(8) "%s"
|
||||
string(10) "%s"
|
||||
string(12) "%s"
|
||||
string(14) "%s"
|
||||
string(16) "%s"
|
||||
string(18) "%s"
|
||||
Reference in New Issue
Block a user