var returnPNGImage = true; // returns PNG image along with the template. Setting it to false, returns only template
var apiKey="To be generated from CAMS API Monitor";
capture(apiKey, returnPNGImage);
...
compare(apiKey,temlate1,temlate2);
function onCaptureSuccess(data)
{
var plainData = data;
//write the program to decrypt if security key is set in API monitor for the scanner
var scannerData = getScannerSuccessData(plainData);
var template = scannerData.template;
var pngImageContent = "data:image/png;base64," + scannerData.image;
}
function onCaptureFailure(data)
{
var failureData = getScannerFailureData(data);
var erroString = failureData.errorString;
}
function onCompareSuccess(data)
{
var plainData = data;
//write the program to decrypt if security key is set in API monitor for the scanner
var scannerData = getScannerSuccessData(plainData);
var matchingScore = scannerData.matchScore;
}
function onCompareFailure(data)
{
var failureData = getScannerFailureData(data);
var erroString = failureData.errorString;
}
pub 2048R/31CBD89E 2016-12-08
Key fingerprint = 5289 95BF EDFB A719 1D46 839E F9BA 0ADA 31CB D89E
uid Joe Watkins <krakjoe@php.net>
pub rsa4096 2021-04-26 [SC] [expires: 2024-11-26]
39B6 4134 3D8C 104B 2B14 6DC3 F9C3 9DC0 B969 8544
uid [ultimate] Ben Ramsey <ramsey@php.net>
sub rsa4096 2021-04-26 [E] [expires: 2024-11-26]
pub rsa4096 2021-04-01 [SC]
F1F6 9223 8FBC 1666 E5A5 CCD4 199F 9DFE F6FF BAFD
uid [ultimate] Patrick Allaert <patrickallaert@php.net>
sub rsa4096 2021-04-01 [E]
let credential = await navigator.credentials.create({ publicKey: {
challenge: new Uint8Array([117, 61, 252, 231, 191, 241, ...]),
rp: { id: "acme.com", name: "ACME Corporation" },
user: {
id: new Uint8Array([79, 252, 83, 72, 214, 7, 89, 26]),
name: "jamiedoe",
displayName: "Jamie Doe"
},
pubKeyCredParams: [ {type: "public-key", alg: -7} ]
}});