🐛 Fix modify password function
This commit is contained in:
parent
58cd6801c7
commit
eb8366abdc
1 changed files with 1 additions and 1 deletions
|
@ -5,7 +5,7 @@ export default function modifyPassword(passwordIn: Uint8Array) {
|
||||||
|
|
||||||
for (let i = 0; i < passwordLength; i += 1) {
|
for (let i = 0; i < passwordLength; i += 1) {
|
||||||
if (passwordIn[i] === 0) { break; }
|
if (passwordIn[i] === 0) { break; }
|
||||||
let curChar = passwordIn[i] + (1 << (i % 32));
|
let curChar = passwordIn[i] + ((1 << (i % 32)) & 0xFF);
|
||||||
if (curChar > 0x7E) {
|
if (curChar > 0x7E) {
|
||||||
if (curChar === 0xFF || curChar === 0x7F) {
|
if (curChar === 0xFF || curChar === 0x7F) {
|
||||||
curChar = 0x3F;
|
curChar = 0x3F;
|
||||||
|
|
Loading…
Reference in a new issue