Ashok Auty
Jul 15, 2017
1:50 pm

Sample application provided by SEAP is not working

We downloaded the sample application provided by the SEAP and installed in samsung device SM-T116IR. After entering the aadhaar number it's open's the iris camera and capturing the iris data. On capture sucess it's throwing error message like "did not get response from server"

In that sample code, after capturing the iris data, converting into base.64 encoded string, but it's returns with empty object.

The below code snippet for get piddata :

private byte[] getPIDXML() {
        Print.d(TAG + " :: getPIDXML | ENTER");
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZZZZZZ", Locale.US);
        String ts = sdf.format(new Date());

       String pid = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>"
                + "<ns2:Pid xmlns:ns2=\"\" " +
                "ts=\""+ ts + "\" >" +
                "<Demo>" +"<Pi " + "name=\""+ "saumya Soman" + "\"/>" + "</Demo>" + "<Bios>" + "</Bios>" + "</ns2:Pid>";

       byte[] piddata = pid.getBytes();
        Print.d(TAG + " :: pidxml is:" + pid);
        return piddata;

Here, pid is constructed with aadhaar url, why it's required?. without that, how we can construct this pid data.

 the below code snippet for get encPEDData :

encPIDData = secIrisManager.getEncryptedPid(piddata, pidtype,
                        SecIrisConstants.BIOTYPE_BOTH_IRIS, chain);

Here we are able to get this encPIDData in byte array format.

the below code snippet for converting into base.64 encoded string :

Base64.encodeToString(sKey, Base64.DEFAULT),
                    Base64.encodeToString(encPIDData, Base64.DEFAULT),
                    Base64.encodeToString(encryptedHmacBytes, Base64.DEFAULT))

Here, we are not getting this encoded string value.

Finally we required only, encPIDData with encoded base64 string fromat.

Could you please help us to generate the encPIDData.

Faisal Ali
Jul 21, 2017
6:09 am

Hi Ashok,

Please understand that the SDK and sample applications for Samsung India Identity SDK, are compatible only with Aadhaar Authentication and e-KYC specification guidelines provided by UIDAI. Only PID block will not be sufficient; since, SDK returns encrypted PID block, encrypted session key and encrypted HMAC of PID block following UIDAI guidelines. This implies you just need to gather these values and place them in Request XML to be sent to UIDAI.

Please capture device dumpstate after recreating the issue and share.