code refactor

This commit is contained in:
MaysWind
2023-04-08 15:58:07 +08:00
parent c4b07b98aa
commit 8c33243c90
8 changed files with 16 additions and 16 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ const appLockStateSessionStorageKey = 'ebk_user_app_lock_state'; // { 'username'
function getAppLockSecret(pinCode) {
const hashedPinCode = CryptoJS.SHA256(appLockSecretBaseStringPrefix + pinCode).toString();
return hashedPinCode.substr(0, 24); // put secret into user id of webauthn (user id total length must less 64 bytes)
return hashedPinCode.substring(0, 24); // put secret into user id of webauthn (user id total length must less 64 bytes)
}
function getEncryptedToken(token, appLockState) {