<?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 Routine not working for md5 function in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Routine-not-working-for-md5-function/m-p/2203187#M4606</link>
    <description>&lt;P&gt;I am using below code/routine in Talned 7.2.1&lt;BR /&gt;Java 11 is the version installed in my system&lt;BR /&gt;below code is not working and erroring out saying javax.xml.bind.DatatypeConverter can not be resolved.&amp;nbsp; can anyone help me here on this .&lt;BR /&gt;&lt;BR /&gt;my requirement is to message digest the string/strings passed .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;package routines;&lt;BR /&gt;import java.security.MessageDigest;&lt;BR /&gt;import javax.xml.bind.DatatypeConverter;&lt;/P&gt;
&lt;P&gt;public class MD5_HashFunction{&lt;/P&gt;
&lt;P&gt;/**&lt;BR /&gt;* Returns a hexadecimal encoded MD5 hash for the input String.&lt;BR /&gt;* {Category} Userdefined&lt;BR /&gt;* {param} data&lt;BR /&gt;* @return&lt;BR /&gt;*/&lt;BR /&gt;public static String getMD5Hash(String... data) {&lt;BR /&gt;StringBuilder sb = new StringBuilder();&lt;BR /&gt;for(String str : data){&lt;BR /&gt;sb.append(str);&lt;BR /&gt;}&lt;BR /&gt;String result = null;&lt;BR /&gt;try {&lt;BR /&gt;MessageDigest digest = MessageDigest.getInstance("MD5");&lt;BR /&gt;byte[] hash = digest.digest(sb.toString().getBytes("UTF-8"));&lt;BR /&gt;return DatatypeConverter.printHexBinary(hash); // make it printable&lt;BR /&gt;} catch (Exception ex) {&lt;BR /&gt;ex.printStackTrace();&lt;BR /&gt;}&lt;BR /&gt;return result;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;</description>
    <pubDate>Tue, 14 Apr 2020 15:06:58 GMT</pubDate>
    <dc:creator>Sudhee_Maximus</dc:creator>
    <dc:date>2020-04-14T15:06:58Z</dc:date>
    <item>
      <title>Routine not working for md5 function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Routine-not-working-for-md5-function/m-p/2203187#M4606</link>
      <description>&lt;P&gt;I am using below code/routine in Talned 7.2.1&lt;BR /&gt;Java 11 is the version installed in my system&lt;BR /&gt;below code is not working and erroring out saying javax.xml.bind.DatatypeConverter can not be resolved.&amp;nbsp; can anyone help me here on this .&lt;BR /&gt;&lt;BR /&gt;my requirement is to message digest the string/strings passed .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;package routines;&lt;BR /&gt;import java.security.MessageDigest;&lt;BR /&gt;import javax.xml.bind.DatatypeConverter;&lt;/P&gt;
&lt;P&gt;public class MD5_HashFunction{&lt;/P&gt;
&lt;P&gt;/**&lt;BR /&gt;* Returns a hexadecimal encoded MD5 hash for the input String.&lt;BR /&gt;* {Category} Userdefined&lt;BR /&gt;* {param} data&lt;BR /&gt;* @return&lt;BR /&gt;*/&lt;BR /&gt;public static String getMD5Hash(String... data) {&lt;BR /&gt;StringBuilder sb = new StringBuilder();&lt;BR /&gt;for(String str : data){&lt;BR /&gt;sb.append(str);&lt;BR /&gt;}&lt;BR /&gt;String result = null;&lt;BR /&gt;try {&lt;BR /&gt;MessageDigest digest = MessageDigest.getInstance("MD5");&lt;BR /&gt;byte[] hash = digest.digest(sb.toString().getBytes("UTF-8"));&lt;BR /&gt;return DatatypeConverter.printHexBinary(hash); // make it printable&lt;BR /&gt;} catch (Exception ex) {&lt;BR /&gt;ex.printStackTrace();&lt;BR /&gt;}&lt;BR /&gt;return result;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2020 15:06:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Routine-not-working-for-md5-function/m-p/2203187#M4606</guid>
      <dc:creator>Sudhee_Maximus</dc:creator>
      <dc:date>2020-04-14T15:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: Routine not working for md5 function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Routine-not-working-for-md5-function/m-p/2203188#M4607</link>
      <description>Check the below link to know the java compatability&lt;BR /&gt;&lt;A href="https://help.talend.com/reader/Vf4kncNeAlVQT~Kv9TVUVQ/1DA7YYAOxD0kKX6~dDLjew" target="_blank" rel="nofollow noopener noreferrer"&gt;https://help.talend.com/reader/Vf4kncNeAlVQT~Kv9TVUVQ/1DA7YYAOxD0kKX6~dDLjew&lt;/A&gt;</description>
      <pubDate>Tue, 14 Apr 2020 16:24:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Routine-not-working-for-md5-function/m-p/2203188#M4607</guid>
      <dc:creator>manodwhb</dc:creator>
      <dc:date>2020-04-14T16:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: Routine not working for md5 function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Routine-not-working-for-md5-function/m-p/2203189#M4608</link>
      <description>&lt;P&gt;Thanks for your reply , I have changed the java version to the compatibility one and its working fine ...&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 May 2020 19:09:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Routine-not-working-for-md5-function/m-p/2203189#M4608</guid>
      <dc:creator>Sudhee_Maximus</dc:creator>
      <dc:date>2020-05-13T19:09:03Z</dc:date>
    </item>
  </channel>
</rss>

