miroir de
https://github.com/nicjes/SonicareGenerator.git
synchronisé 2025-03-05 16:00:50 +01:00
Pad password with 0 on the left
Cette révision appartient à :
Parent
de2626ddd5
révision
f4dd371ba9
1 fichiers modifiés avec 1 ajouts et 1 suppressions
|
@ -78,7 +78,7 @@
|
|||
crc = crc | crc16(crc, mfg) << BigInt(16); // Calculate the MFG CRC
|
||||
crc = ((crc >> BigInt(8)) & BigInt(0x00FF00FF)) | ((crc << BigInt(8)) & BigInt(0xFF00FF00)); // Rotate the bytes
|
||||
|
||||
let password = crc.toString(16).toUpperCase().replace(/(..)(..)(..)(..)/g, '$1:$2:$3:$4'); // Format the password
|
||||
let password = crc.toString(16).padStart(8, '0').toUpperCase().replace(/(..)(..)(..)(..)/g, '$1:$2:$3:$4'); // Format the password
|
||||
return password;
|
||||
}
|
||||
|
||||
|
|
Chargement…
Ajouter une table
Référencer dans un nouveau ticket