瀏覽代碼

[php] Add externs for `random_bytes()` and `random_int()` (#9884)

Cédric Belin 4 年之前
父節點
當前提交
cbf73bacc4
共有 1 個文件被更改,包括 10 次插入0 次删除
  1. 10 0
      std/php/Global.hx

+ 10 - 0
std/php/Global.hx

@@ -554,6 +554,16 @@ extern class Global {
 	**/
 	static function mt_getrandmax():Int;
 
+	/**
+		@see http://php.net/manual/en/function.random-bytes.php
+	**/
+	static function random_bytes(length:Int):String;
+
+	/**
+		@see http://php.net/manual/en/function.random-int.php
+	**/
+	static function random_int(min:Int, max:Int):Int;
+
 	/**
 		@see http://php.net/manual/en/function.is-nan.php
 	**/