mirror of
https://github.com/Qortal/Qortal-Hub.git
synced 2025-11-03 06:27:05 +00:00
add loader and remove logs
This commit is contained in:
@@ -13,11 +13,9 @@ export const decryptStoredWallet = async (password, wallet) => {
|
||||
const salt = Base58.decode(wallet.salt)
|
||||
|
||||
const key = await kdf(password, salt, threads)
|
||||
console.log('key2', key)
|
||||
const encryptionKey = key.slice(0, 32)
|
||||
const macKey = key.slice(32, 63)
|
||||
const mac = new HmacSha512(macKey).process(encryptedSeedBytes).finish().result
|
||||
console.log(Base58.encode(mac), wallet.mac)
|
||||
if (Base58.encode(mac) !== wallet.mac) {
|
||||
throw new Error("Incorrect password")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user