feat: add onboarding with oldmarr import (#1606)

This commit is contained in:
Meier Lukas
2024-12-15 15:40:26 +01:00
committed by GitHub
parent 82ec77d2da
commit 6de74d9525
108 changed files with 6045 additions and 312 deletions

View File

@@ -25,6 +25,10 @@ export function encryptSecret(text: string): `${string}.${string}` {
}
export function decryptSecret(value: `${string}.${string}`) {
return decryptSecretWithKey(value, key);
}
export function decryptSecretWithKey(value: `${string}.${string}`, key: Buffer) {
const [data, dataIv] = value.split(".") as [string, string];
const initializationVector = Buffer.from(dataIv, "hex");
const encryptedText = Buffer.from(data, "hex");