function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Adheena jacob 1Adheena jacob 1 

Invalid Fingerprint generation when salesforce is integrated with nab transact

I have integrated salesforce and nab transact for payment purpose. I created fingerprint in my visualforce page using javascript. Now for security reasons I need to change fingerprint generation from visualforce page to my apex controller. I have the following code for the same.
 
String hashv= nabname+'|'+nabpass+ '|2|'+paymentId+'|'+ amtT + '|' + now_utc;
String targetString =hashv ;
Blob targetBlob = Blob.valueOf(targetString);
Blob hashSHA1 = Crypto.generateDigest('SHA1', targetBlob);
String hashBase64SHA1 = EncodingUtil.base64encode(hashSHA1);

"hashBase64SHA1" variable is assigned to the fringerprint field in my vf page. This gives me invalid Fingerprint error. Can anyone help me.
Thanks in advance.
Adheena jacob 1Adheena jacob 1
This worked for me
String shasign = EncodingUtil.convertToHex(Crypto.generateDigest('SHA1',Blob.valueOf(hashv)));