Open
Description
Hi all,
I am trying to use decryptPrivateKey. However, whenever I fire it (with an await construct), my app goes to background. Actually, it probably goes to pause (I see it in overview on Android) since a console.log immediately following the statement (and in the catch statement) never fires.
For testing, just before the decryptPrivateKey call I did a await RSA.generate(2048), which works as expected.
I made sure to have RSA.useJSI = false; just to be sure.
On resuming the App the bundle gets reloaded and the App starts over. But this is probably out of scope here...
The code is this
import RSA from 'react-native-fast-rsa';
export async function test(encryptedRSAKey, password) {
try {
debugger;
const key = await RSA.generate(2048);
debugger;
let result = '';
result = await RSA.decryptPrivateKey(encryptedRSAKey, password)
console.log('Done')
return result;
} catch(error) {
console.log ('Failed to extract / unlock the RSA Private key - ' + error)
throw error;
}
}
Metadata
Metadata
Assignees
Labels
No labels