Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function decrypt(ciphertext, password) {
try {
const decryptedJson = seedUtils.decryptSeed(ciphertext, password);
return JSON.parse(decryptedJson)
} catch (e) {
throw new Error('Invalid password')
}
}
export function decrypt(encryptedText: string, password: string): T | never {
try {
const decryptedJson = seedUtils.decryptSeed(encryptedText, password);
return JSON.parse(decryptedJson)
} catch (e) {
throw new Error('Invalid password')
}
}