<?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 Re: Check Sha-1 in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Check-Sha-1/m-p/2361519#M125845</link>
    <description>You can do this, if your files are in specific sort order of name/date else not possible&lt;BR /&gt;Vaibhav</description>
    <pubDate>Tue, 16 Sep 2014 09:30:45 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-09-16T09:30:45Z</dc:date>
    <item>
      <title>Check Sha-1</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Check-Sha-1/m-p/2361513#M125839</link>
      <description>Hi all,&lt;BR /&gt;i am receiving in a ftp 2 files:&amp;nbsp;&lt;BR /&gt;&amp;nbsp; - 1 csv for data&lt;BR /&gt;&amp;nbsp; - 1 csv for a sha-1 hash&lt;BR /&gt;I need to check if the file was not altered, so i want to calculate the sha-1 of the csv containing the date versus the hash received&lt;BR /&gt;Please how can i perform this task in Talend ?&lt;BR /&gt;Thank you in advance&lt;BR /&gt;Br</description>
      <pubDate>Mon, 15 Sep 2014 11:50:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Check-Sha-1/m-p/2361513#M125839</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-15T11:50:58Z</dc:date>
    </item>
    <item>
      <title>Re: Check Sha-1</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Check-Sha-1/m-p/2361514#M125840</link>
      <description>Hi, 
&lt;BR /&gt;Check the solution given in the thread... 
&lt;BR /&gt; 
&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCqZFCA0" rel="nofollow noopener noreferrer"&gt;https://community.talend.com/t5/Design-and-Development/sha1-hash-key/td-p/109750&lt;/A&gt; 
&lt;BR /&gt;I would have following approach.. 
&lt;BR /&gt;Generate sha-1 for input file and write it to another file 
&lt;BR /&gt;Read both sha-1 and use inner join to check using tMap. In case of reject row, the file is altered, else it is not. 
&lt;BR /&gt;I hope you got an idea. 
&lt;BR /&gt;Vaibhav</description>
      <pubDate>Mon, 15 Sep 2014 15:19:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Check-Sha-1/m-p/2361514#M125840</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-15T15:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: Check Sha-1</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Check-Sha-1/m-p/2361515#M125841</link>
      <description>Here's a "routine" that generates a hash for a String. This might give you the right pointer if you want to adapt it for hashing an entire file.
&lt;BR /&gt;public static String getSHA256(String plainText) {
&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if(plainText == null) return null;
&lt;BR /&gt;&amp;nbsp;&amp;nbsp; else {
&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.update(plainText.getBytes("UTF-8"));
&lt;BR /&gt;&amp;nbsp;&amp;nbsp; byte[] bytes = md.digest();
&lt;BR /&gt;&amp;nbsp;&amp;nbsp; java.math.BigInteger bI = new java.math.BigInteger(1, bytes);
&lt;BR /&gt;&amp;nbsp;&amp;nbsp; return bI.toString(16);
&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;&amp;nbsp; }</description>
      <pubDate>Mon, 15 Sep 2014 18:43:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Check-Sha-1/m-p/2361515#M125841</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-15T18:43:14Z</dc:date>
    </item>
    <item>
      <title>Re: Check Sha-1</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Check-Sha-1/m-p/2361516#M125842</link>
      <description>Thank you ,&lt;BR /&gt;it works with a pair of data and checksum file. but my issue is that in my folder i have many files ( lets say 10 data files and 10 checksum files).&amp;nbsp;&lt;BR /&gt;How can i articulate my job in order to:&lt;BR /&gt;- read data file&lt;BR /&gt;- calculate checksum from this file&lt;BR /&gt;- compare the value to the checksum file&lt;BR /&gt;file by file ?&lt;BR /&gt;Thank you</description>
      <pubDate>Mon, 15 Sep 2014 21:18:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Check-Sha-1/m-p/2361516#M125842</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-15T21:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: Check Sha-1</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Check-Sha-1/m-p/2361517#M125843</link>
      <description>If you have above scenario, then you can
&lt;BR /&gt;- Create a single file with 10 SHA-1 for input file
&lt;BR /&gt;- Create a single file with 10 SHA-1 for sha-1 files
&lt;BR /&gt;- Use tMap to compare both the files to each other.
&lt;BR /&gt;This way it will compare the code to each other
&lt;BR /&gt;Reason for not doing this in existing files is that, tFileList component reads file one by one and there is no option to re-load all file once again after completion.
&lt;BR /&gt;Thanks
&lt;BR /&gt;Vaibhav</description>
      <pubDate>Tue, 16 Sep 2014 09:13:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Check-Sha-1/m-p/2361517#M125843</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-16T09:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: Check Sha-1</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Check-Sha-1/m-p/2361518#M125844</link>
      <description>Thank you Vaibhav,&lt;BR /&gt;will try this.&lt;BR /&gt;SO if i understand it is not possible to compare pair by pair for example (datafile 1 &amp;amp; checksumfile1), then (datafile 2 &amp;amp; checksumfile2) ...........(datafile n &amp;amp; checksumfile n) &amp;nbsp;?&lt;BR /&gt;Best Regards</description>
      <pubDate>Tue, 16 Sep 2014 09:29:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Check-Sha-1/m-p/2361518#M125844</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-16T09:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: Check Sha-1</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Check-Sha-1/m-p/2361519#M125845</link>
      <description>You can do this, if your files are in specific sort order of name/date else not possible&lt;BR /&gt;Vaibhav</description>
      <pubDate>Tue, 16 Sep 2014 09:30:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Check-Sha-1/m-p/2361519#M125845</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-16T09:30:45Z</dc:date>
    </item>
    <item>
      <title>Re: Check Sha-1</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Check-Sha-1/m-p/2361520#M125846</link>
      <description>hi Vaibhav, 
&lt;BR /&gt;my files are named as follows: 
&lt;BR /&gt;data files: "XXXXXX-YYYYMMDDHHMMSS.csv" &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;( Y=year, M=month, D=day, H=hour, M=minute, S=second) 
&lt;BR /&gt;checksum files: "XXXXX_YYYYMMDDHHMMSS.syn" &amp;nbsp; &amp;nbsp; ( Y=year, M=month, D=day, H=hour, M=minute, S=second) 
&lt;BR /&gt;Each pair of files (data file, associated checksum file) have the same (date, hour) in the filename. 
&lt;BR /&gt;Regards</description>
      <pubDate>Tue, 16 Sep 2014 09:38:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Check-Sha-1/m-p/2361520#M125846</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-16T09:38:53Z</dc:date>
    </item>
  </channel>
</rss>

