feat: 实现非对称加密关键接口

This commit is contained in:
kuaifan
2023-03-27 10:09:00 +08:00
parent ef7ed58a22
commit 7e98a78333
43 changed files with 724 additions and 394 deletions

View File

@@ -1933,60 +1933,6 @@ class Base
}
}
/**
* php://input 字符串解析到变量并获取指定值
* @param $key
* @return array
*/
public static function getContentsParse($key)
{
parse_str(Request::getContent(), $input);
if ($key) {
$input = $input[$key] ?? array();
}
return is_array($input) ? $input : array($input);
}
/**
* php://input 字符串解析到变量并获取指定值
* @param $key
* @param null $default
* @return mixed|null
*/
public static function getContentValue($key, $default = null)
{
global $_A;
if (!isset($_A["__static_input_content"])) {
parse_str(Request::getContent(), $input);
$_A["__static_input_content"] = $input;
}
return $_A["__static_input_content"][$key] ?? $default;
}
/**
* @param $key
* @param null $default
* @return array|mixed|string|null
*/
public static function getPostValue($key, $default = null)
{
$value = self::getContentValue($key, $default);
if (!isset($value)) {
$value = Request::post($key, $default);
}
return $value;
}
/**
* @param $key
* @param null $default
* @return int
*/
public static function getPostInt($key, $default = null)
{
return intval(self::getPostValue($key, $default));
}
/**
* 多维 array_values
* @param $array