mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
cryptoUtils.decrypt alligned with encrypt in regards of handling extra space in password file
This commit is contained in:
@@ -47,7 +47,7 @@ const decrypt = async (encryptedData: string) => {
|
|||||||
return encryptedData;
|
return encryptedData;
|
||||||
}
|
}
|
||||||
|
|
||||||
const secret = await Bun.file(RESTIC_PASS_FILE).text();
|
const secret = (await Bun.file(RESTIC_PASS_FILE).text()).trim();
|
||||||
|
|
||||||
const parts = encryptedData.split(":").slice(1); // Remove prefix
|
const parts = encryptedData.split(":").slice(1); // Remove prefix
|
||||||
const saltHex = parts.shift() as string;
|
const saltHex = parts.shift() as string;
|
||||||
|
|||||||
Reference in New Issue
Block a user