refactor: remove trim on password
The password should be taken as-is. It could potentially contain a space
This commit is contained in:
parent
70c72f0f9a
commit
e4b8076351
1 changed files with 1 additions and 1 deletions
|
|
@ -25,7 +25,7 @@ const encrypt = async (data: string) => {
|
||||||
return data;
|
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 salt = crypto.randomBytes(16);
|
||||||
const key = crypto.pbkdf2Sync(secret, salt, 100000, keyLength, "sha256");
|
const key = crypto.pbkdf2Sync(secret, salt, 100000, keyLength, "sha256");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue