已解决 关于password加密方式的疑问

使用sonarqube扫描的时候提示

 $encrypted = base64_encode(mcrypt_encrypt(MCRYPT_DES, substr($secret, 0, 8), $password, MCRYPT_MODE_CBC, $iv));
这个DES加密方式是对登录账号密码的加密吗,源代码中还有其他的加密方式吗,不是的话具体是对什么的加密

public static function encryptPassword($password)
293
 {
294
 global $config;
295

296
 $encrypted = '';
297
 if(!empty($config->encryptSecret) and $password)
298
 {
299
 $secret = $config->encryptSecret;
300
 $iv = str_repeat("\0", 8);
301
 if(function_exists('mcrypt_encrypt'))
302
 {
303
 $encrypted = base64_encode(mcrypt_encrypt(MCRYPT_DES, substr($secret, 0, 8), $password, MCRYPT_MODE_CBC, $iv));
Use a strong cipher algorithm为何是问题?
L303
评论
304
 }
305
 elseif(function_exists('openssl_encrypt'))
306
 {
307
 /* Set password length to multiple of 8. For compatible mcrypt_encrypt function. */
308
 $oversize = strlen($password) % 8;
309
 if($oversize != 0) $password .= str_repeat("\0", 8 - $oversize);
310

311
 $encrypted = openssl_encrypt($password, 'DES-CBC', substr($secret, 0, 8), OPENSSL_ZERO_PADDING, $iv);
Use a strong cipher algorithm为何是问题?
L311
评论
312
 }

禅道版本 16.5 源码包
操作系统
客户端浏览器

提问者: 戴先生 悬赏:5 日期: 2022-05-10 10:29:40 答案:1 点击:920

获取技术支持

QQ: 电话:
设置备注
答案列表
2022/05/10

禅道密码用的md5加密。

可以联系下商务丁芝(QQ:1481227768),邀请加入技术交流群,群里发下扫描文件,我们确认下。