mirror of
https://github.com/nextcloud/passman.git
synced 2025-02-26 08:24:00 +08:00
Fix 16 Bits Codes
Signed-off-by: ZanderCodes <admin@zandercodes.com>
This commit is contained in:
parent
2abc72b02e
commit
4384f8e4de
1 changed files with 2 additions and 6 deletions
|
@ -53,15 +53,11 @@
|
|||
bits += leftpad(val.toString(2), 5, '0');
|
||||
}
|
||||
|
||||
for (i = i % 8; i > 0; i--) {
|
||||
bits += leftpad('0', 5, '0');
|
||||
}
|
||||
|
||||
for (i = 0; i + 4 <= bits.length; i += 4) {
|
||||
var chunk = bits.substr(i, 4);
|
||||
hex = hex + parseInt(chunk, 2).toString(16);
|
||||
}
|
||||
return hex;
|
||||
return hex.length % 2 ? hex + "0" : hex;
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue