refactor: remove trim on password

The password should be taken as-is. It could potentially contain a space
This commit is contained in:
Nicolas Meienberger
2025-12-06 10:08:01 +01:00
parent 70c72f0f9a
commit e4b8076351

View File

@@ -25,7 +25,7 @@ const encrypt = async (data: string) => {
return data;
}
const secret = (await Bun.file(RESTIC_PASS_FILE).text()).trim();
const secret = await Bun.file(RESTIC_PASS_FILE).text();
const salt = crypto.randomBytes(16);
const key = crypto.pbkdf2Sync(secret, salt, 100000, keyLength, "sha256");