feat: 标准化凭据获取

This commit is contained in:
手瓜一十雪
2024-10-22 11:04:28 +08:00
parent db9a09eff6
commit 3067b1998d
5 changed files with 48 additions and 3 deletions

View File

@@ -338,4 +338,12 @@ export class NTQQWebApi {
}
return (hash & 0x7FFFFFFF).toString();
}
public getBknFromSKey(sKey: string) {
let hash = 5381;
for (let i = 0; i < sKey.length; i++) {
const code = sKey.charCodeAt(i);
hash = hash + (hash << 5) + code;
}
return (hash & 0x7FFFFFFF).toString();
}
}