app/Controllers/UserController.php
即可 添加在updateMethod
里的$user->method = $method;
后即可
以下代码添加前建议适当修改
禁止用户选择非AEAD加密方式
if (!in_array($method, array('aes-128-gcm', 'aes-192-gcm', 'aes-256-gcm', 'chacha20-ietf-poly1305', 'xchacha20-ietf-poly1305'))) {
$res['ret'] = 0;
$res['msg'] = '为确保安全,您仅可使用AEAD加密算法,请在以下加密方式中选择:aes-128-gcm, aes-192-gcm, aes-256-gcm, chacha20-ietf-poly1305, xchacha20-ietf-poly1305';
return $this->echoJson($response, $res);
}