feat: add onboarding with oldmarr import (#1606)
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user