React Native
React Native
Example: Crypt2.AddPfxSourceFile method
Demonstrates how to call the AddPfxSourceFile method.Chilkat React Native Downloads
import { Crypt2 } from '@chilkat/react-native'
function chilkatExample() {
const crypt = new Crypt2();
// Do public-key decryption (RSA)
crypt.cryptAlgorithm = 'pki';
// ...
// ...
// ...
let pfxPath = 'c:/my_pfx_files/a.pfx';
let pfxPassword = 'secret1';
try {
crypt.addPfxSourceFile(pfxPath, pfxPassword);
} catch {
console.log(crypt.lastErrorText);
return;
}
// Add as many as PFX sources as desired...
pfxPath = 'c:/my_pfx_files/b.pfx';
pfxPassword = 'secret2';
try {
crypt.addPfxSourceFile(pfxPath, pfxPassword);
} catch {
console.log(crypt.lastErrorText);
return;
}
// ...
// ...
}