React Native Requires Chilkat v11.0.0+
React Native
Example: Crypt2.LastSignerCert method
Demonstrates how to call the LastSignerCert method.Chilkat React Native Downloads
import { Cert, Crypt2 } from '@chilkat/react-native'
function chilkatExample() {
const crypt = new Crypt2();
const p7mPath = 'qa_data/p7m/Firma.docx.p7m';
const outPath = 'qa_output/Firma.docx';
try {
crypt.verifyP7M(p7mPath, outPath);
} catch {
console.log(crypt.lastErrorText);
return;
}
// Examine the certificate(s) used for signing.
const numSigners = crypt.numSignerCerts;
let i = 0;
const cert = new Cert();
while (i < numSigners) {
crypt.lastSignerCert(i, cert);
console.log(`Signer: ${cert.subjectDN}`);
i++;
}
}