<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Correct Finger print not getting generated in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Correct-Finger-print-not-getting-generated/m-p/49010#M24635</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have written java code to create a unique fingerprint but I am seeing that the finger print generated does not map with one genretaed by Authorize.net tool&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Finger print from java code: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;c3063337bb38216506b62140d3d2315e&lt;/P&gt;
&lt;P&gt;Finge print from Authorize error code tool:&amp;nbsp;3e27938b0dc41131b977edc13c9b8c15&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Due to which I am getting error code 99 when opening the SIM form, can you please let me know why this 2 finger print do not match.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Java code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.io.UnsupportedEncodingException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
public class test1 {
/**
* @Param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println(hmacDigest("5H4P6xnv^78656712^1417088591^20.0", "****", "HmacMD5"));
}
public static String hmacDigest(String msg, String keyString, String algo) {
String digest = null;
try {
SecretKeySpec key = new SecretKeySpec((keyString).getBytes("UTF-8"), algo);
Mac mac = Mac.getInstance(algo);
mac.init(key);
byte[] bytes = mac.doFinal(msg.getBytes("ASCII"));
StringBuffer hash = new StringBuffer();
for (int i = 0; i &amp;lt; bytes.length; i++) {
String hex = Integer.toHexString(0xFF &amp;amp; bytes[i]);
if (hex.length() == 1) {
hash.append('0');
}
hash.append(hex);
}
digest = hash.toString();
} catch (UnsupportedEncodingException e) {
} catch (InvalidKeyException e) {
} catch (NoSuchAlgorithmException e) {
}
return digest;
}
}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Dec 2014 23:49:38 GMT</pubDate>
    <dc:creator>nitinb123</dc:creator>
    <dc:date>2014-12-03T23:49:38Z</dc:date>
    <item>
      <title>Correct Finger print not getting generated</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Correct-Finger-print-not-getting-generated/m-p/49010#M24635</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have written java code to create a unique fingerprint but I am seeing that the finger print generated does not map with one genretaed by Authorize.net tool&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Finger print from java code: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;c3063337bb38216506b62140d3d2315e&lt;/P&gt;
&lt;P&gt;Finge print from Authorize error code tool:&amp;nbsp;3e27938b0dc41131b977edc13c9b8c15&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Due to which I am getting error code 99 when opening the SIM form, can you please let me know why this 2 finger print do not match.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Java code&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import java.io.UnsupportedEncodingException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
public class test1 {
/**
* @Param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println(hmacDigest("5H4P6xnv^78656712^1417088591^20.0", "****", "HmacMD5"));
}
public static String hmacDigest(String msg, String keyString, String algo) {
String digest = null;
try {
SecretKeySpec key = new SecretKeySpec((keyString).getBytes("UTF-8"), algo);
Mac mac = Mac.getInstance(algo);
mac.init(key);
byte[] bytes = mac.doFinal(msg.getBytes("ASCII"));
StringBuffer hash = new StringBuffer();
for (int i = 0; i &amp;lt; bytes.length; i++) {
String hex = Integer.toHexString(0xFF &amp;amp; bytes[i]);
if (hex.length() == 1) {
hash.append('0');
}
hash.append(hex);
}
digest = hash.toString();
} catch (UnsupportedEncodingException e) {
} catch (InvalidKeyException e) {
} catch (NoSuchAlgorithmException e) {
}
return digest;
}
}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Dec 2014 23:49:38 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Correct-Finger-print-not-getting-generated/m-p/49010#M24635</guid>
      <dc:creator>nitinb123</dc:creator>
      <dc:date>2014-12-03T23:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: Correct Finger print not getting generated</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Correct-Finger-print-not-getting-generated/m-p/49039#M24660</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hi &lt;SPAN class="UserName lia-user-name"&gt;&lt;A id="link_29" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://community.developer.cybersource.com/t5/user/viewprofilepage/user-id/16619" target="_self"&gt;&lt;SPAN class=""&gt;nitinb123&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please make sure to include the final caret seperator between the amount and (optional) currency code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Joy&lt;/P&gt;</description>
      <pubDate>Thu, 04 Dec 2014 00:00:28 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Correct-Finger-print-not-getting-generated/m-p/49039#M24660</guid>
      <dc:creator>Joy</dc:creator>
      <dc:date>2014-12-04T00:00:28Z</dc:date>
    </item>
  </channel>
</rss>

