<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tanmay Khatri </title>
    <description>The latest articles on DEV Community by Tanmay Khatri  (@tanmay53).</description>
    <link>https://dev.to/tanmay53</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F427642%2F76823cdf-8978-462e-a017-18be16a3ab8c.png</url>
      <title>DEV Community: Tanmay Khatri </title>
      <link>https://dev.to/tanmay53</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tanmay53"/>
    <language>en</language>
    <item>
      <title>Typescript : Objects : Index Signatures</title>
      <dc:creator>Tanmay Khatri </dc:creator>
      <pubDate>Tue, 15 Nov 2022 21:37:44 +0000</pubDate>
      <link>https://dev.to/tanmay53/typescript-objects-index-signatures-5db7</link>
      <guid>https://dev.to/tanmay53/typescript-objects-index-signatures-5db7</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ a: string; }'.&lt;br&gt;
  No index signature with a parameter of type 'string' was found on type '{ a: string; }'.ts(7053)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If you have encountered an error like above then you probably need to the Index Signature in your Object Interface.&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>react</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Vulnerabilities in Cryptographic Algorithms</title>
      <dc:creator>Tanmay Khatri </dc:creator>
      <pubDate>Sat, 08 Oct 2022 19:21:17 +0000</pubDate>
      <link>https://dev.to/tanmay53/vulnerabilities-in-cryptographic-algorithms-570l</link>
      <guid>https://dev.to/tanmay53/vulnerabilities-in-cryptographic-algorithms-570l</guid>
      <description>&lt;p&gt;We all have used Cryptographic algorithms to Secure our data and passwords.&lt;br&gt;
But are they all completely secure?&lt;br&gt;
Let's see for the two most common ones&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;SHA2&lt;/li&gt;
&lt;li&gt;MD5&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  SHA2 (256, 512, 224, 384)
&lt;/h2&gt;

&lt;p&gt;This family of hash functions relies on sounds and numbers to create a checksum value. The resultant checksums are vulnerable to length extension attacks, which involve a hacker reconstructing the internal state of a file by learning its hash digest.&lt;/p&gt;

&lt;p&gt;Public attacks on SHA-2 have been happening since 2008. Just like what happened with SHA-1, the attacks against SHA-2 have been getting increasingly better and weakening SHA-2 over time. Some attacks have SHA-2’s effective protection down to 237. Some of the latest attacks, publicly announced in 2016, consider SHA-2 attacks to already be “practical”. &lt;/p&gt;

&lt;h2&gt;
  
  
  MD5
&lt;/h2&gt;

&lt;p&gt;This hash function creates a checksum value, but each data will not necessarily have a unique hash, so it is open to vulnerabilities if a hacker swaps out some data with the same checksum value.&lt;/p&gt;

&lt;p&gt;Desired hash with a different plaintext can be generated maliciously in MD5.&lt;/p&gt;




&lt;p&gt;So we are not that safe as we thought to be...&lt;/p&gt;

&lt;p&gt;To Know More Visit:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://www.techtarget.com/searchsecurity/definition/checksum#:~:text=A%20checksum%20is%20a%20value,running%20a%20cryptographic%20hash%20function."&gt;Know about Checksums&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://community.isc2.org/t5/Tech-Talk/SHA-2-Vulnerability/td-p/25746"&gt;ISC2 Community&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://security.stackexchange.com/questions/138363/why-is-md5-considered-a-vulnerable-algorithm"&gt;Stack Exchange&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>md5</category>
      <category>sha256</category>
      <category>cryptography</category>
    </item>
    <item>
      <title>Without Reverting, Open old version of Code with Git | Git Tag</title>
      <dc:creator>Tanmay Khatri </dc:creator>
      <pubDate>Fri, 07 Oct 2022 22:44:28 +0000</pubDate>
      <link>https://dev.to/tanmay53/without-reverting-open-old-version-of-code-with-git-git-tag-3ged</link>
      <guid>https://dev.to/tanmay53/without-reverting-open-old-version-of-code-with-git-git-tag-3ged</guid>
      <description>&lt;p&gt;Was your current merge to production buggy?&lt;br&gt;
Do you want to go back to the previous version of code without reverting the changes?&lt;/p&gt;
&lt;h2&gt;
  
  
  Switching to old version without Reverting
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git checkout &amp;lt;commit &lt;span class="nb"&gt;id &lt;/span&gt;of the previous/old merge&amp;gt;
git checkout 893faa2a
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;What this does is that it shifts the HEAD to the old version of the code stored in git without making any changes to the commit history.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8Dvc9T_s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rx33crjsry117zt0qp9k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8Dvc9T_s--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rx33crjsry117zt0qp9k.png" alt="Commit Checkout without Reverting" width="880" height="310"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The HEAD is in detached mode so you can make changes and commit them but they will not affect the branch&lt;br&gt;
To keep the changes and commits, you can create a new branch by :&lt;br&gt;
&lt;code&gt;git switch -c &amp;lt;new-branch-name&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This look cool but, the problem arises when you have to remember the commit ids for the merge commits and it is a tedious task.&lt;/p&gt;
&lt;h2&gt;
  
  
  Using Tags in Git
&lt;/h2&gt;

&lt;p&gt;Git has a special feature of tagging the commits.&lt;br&gt;
We can use this feature to tag our commits/merge commits as a version of the code.&lt;/p&gt;
&lt;h3&gt;
  
  
  To add a tag to the current commit
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git tag &amp;lt;name-of-the-tag&amp;gt;
git tag v1.4.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  To add a tag to an old commit
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git tag &amp;lt;name-of-the-tag&amp;gt; &amp;lt;commit-id&amp;gt;
git tag v1.3.0 893faa2a
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  To list all tags
&lt;/h3&gt;

&lt;p&gt;We can also list all the available tags in ascending order.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git tag
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aQsMv99O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ldwe61v0vc241yl4voxq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aQsMv99O--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ldwe61v0vc241yl4voxq.png" alt="Listing Available tags with Git" width="290" height="115"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that we have tagged our commits we can easily remember their names and checkout to them whenever we want without reverting the code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Switching to old version without Reverting using Tags
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git checkout &amp;lt;tag-name&amp;gt;
git checkout v1.3.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8OUE6YeQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wkg2870o00mcgb5zzjwz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8OUE6YeQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wkg2870o00mcgb5zzjwz.png" alt="Switching to old version of code without Reverting using Tags in Git" width="880" height="311"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For More Info Visit&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.freecodecamp.org/news/git-tag-explained-how-to-add-remove/"&gt;Git Tag Explained&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git-scm.com/docs/git-tag"&gt;Git-Tag&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://git-scm.com/docs/git-checkout"&gt;Git-Checkout&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>git</category>
    </item>
  </channel>
</rss>
