<?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 sha1 hash key in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/sha1-hash-key/m-p/2352376#M118784</link>
    <description>i need to generate hash key with sha1 algorithm how can we do it with java code or sqlserver query</description>
    <pubDate>Sat, 16 Nov 2024 12:29:36 GMT</pubDate>
    <dc:creator>Raghunath</dc:creator>
    <dc:date>2024-11-16T12:29:36Z</dc:date>
    <item>
      <title>sha1 hash key</title>
      <link>https://community.qlik.com/t5/Talend-Studio/sha1-hash-key/m-p/2352376#M118784</link>
      <description>i need to generate hash key with sha1 algorithm how can we do it with java code or sqlserver query</description>
      <pubDate>Sat, 16 Nov 2024 12:29:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/sha1-hash-key/m-p/2352376#M118784</guid>
      <dc:creator>Raghunath</dc:creator>
      <dc:date>2024-11-16T12:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: sha1 hash key</title>
      <link>https://community.qlik.com/t5/Talend-Studio/sha1-hash-key/m-p/2352377#M118785</link>
      <description>Hi&lt;BR /&gt;You can create Routine(hard code Java class and methods) in 'Repository-Code-Routines'.&lt;BR /&gt;Then call the methods of Java SHA1 implement in Talend components such as tMap, tJava and so on.&lt;BR /&gt;Hope this will help you.&lt;BR /&gt;Best regards!&lt;BR /&gt;Pedro</description>
      <pubDate>Thu, 22 Dec 2011 05:32:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/sha1-hash-key/m-p/2352377#M118785</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-12-22T05:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: sha1 hash key</title>
      <link>https://community.qlik.com/t5/Talend-Studio/sha1-hash-key/m-p/2352378#M118786</link>
      <description>Hi,&lt;BR /&gt;I am new to Talend and i had the same query like i have to generate hash key using SHA-1 Algorithm.So please provide me the detailed process of doing it...&lt;BR /&gt;Thanks</description>
      <pubDate>Tue, 12 Apr 2016 06:35:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/sha1-hash-key/m-p/2352378#M118786</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-04-12T06:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: sha1 hash key</title>
      <link>https://community.qlik.com/t5/Talend-Studio/sha1-hash-key/m-p/2352379#M118787</link>
      <description>Here's some examples of methods that you can add to a Talend routine, for doing this.
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; public static String getMD5(String field) {
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; if(field == null) return null;
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; try {
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; java.security.MessageDigest md = java.security.MessageDigest.getInstance("MD5");
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; md.reset();
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; md.update(field.getBytes("UTF-8"));
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; byte[] digest = md.digest();
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; java.math.BigInteger bigInt = new java.math.BigInteger(1, digest);
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; String hashText = bigInt.toString(16);
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; // Now we need to zero pad it if you actually want the full 32 chars.
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; while(hashText.length() &amp;lt; 32 ){
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; hashText = "0" + hashText;
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return hashText;
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; catch (Exception e) {
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; return null;
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }
&lt;BR /&gt;&amp;nbsp;
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; public static String getSHA256(String field) {
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; if(field == null) return null;
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; 
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; try {
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; java.security.MessageDigest md = java.security.MessageDigest.getInstance("SHA-256");
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; md.reset();
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; md.update(field.getBytes("UTF-8"));
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; byte[] digest = md.digest();
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; java.math.BigInteger bigInt = new java.math.BigInteger(1, digest);
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; String hashText = bigInt.toString(16);
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; // Now we need to zero pad it if you actually want the full 32 chars.
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; while(hashText.length() &amp;lt; 32 ){
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; hashText = "0" + hashText;
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return hashText;
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; catch (Exception e) {
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; return null;
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }
&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }</description>
      <pubDate>Tue, 12 Apr 2016 07:41:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/sha1-hash-key/m-p/2352379#M118787</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-04-12T07:41:40Z</dc:date>
    </item>
  </channel>
</rss>

