perf: 密码以 md5 存储

This commit is contained in:
Clansty 2022-03-07 15:15:29 +08:00
parent 07d428dfad
commit cab4ad23e9
No known key found for this signature in database
GPG Key ID: 05F8479BA63A8E92
1 changed files with 2 additions and 0 deletions

View File

@ -8,6 +8,7 @@ import { Platform } from 'oicq';
import commands from '../constants/commands';
import { WorkMode } from '../types/definitions';
import OicqClient from '../client/OicqClient';
import { md5Hex } from '../utils/hashing';
export default class SetupController {
private readonly setupService: SetupService;
@ -89,6 +90,7 @@ export default class SetupController {
]);
if (isPasswordLogin === '密码登录') {
password = await this.setupService.waitForOwnerInput('请输入密码', undefined, true);
password = md5Hex(password);
}
this.oicq = await this.setupService.createOicq(uin, password, platform);
await this.setupService.informOwner(`登录成功`);