<?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: Working with SHA1 value. in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-SHA1-value-to-integer-with-base-16/m-p/621480#M216027</link>
    <description>&lt;P&gt;A SHA1 value would be an integer too big to represent in 64 bits, which probably is why &lt;FONT face="courier new,courier"&gt;tonumber&lt;/FONT&gt; fails.&lt;/P&gt;&lt;P&gt;What problem are you trying to solve?&lt;/P&gt;</description>
    <pubDate>Sun, 20 Nov 2022 14:35:27 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2022-11-20T14:35:27Z</dc:date>
    <item>
      <title>How to convert SHA1 value to integer with base 16?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-SHA1-value-to-integer-with-base-16/m-p/621478#M216026</link>
      <description>&lt;P&gt;Hi ,,&lt;/P&gt;
&lt;P&gt;i am looking for the way if i could convert sha1 value to integer with base 16 to do the further arithmetic operations on it using eval.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i tried :&lt;/P&gt;
&lt;P&gt;..... |eval sha=sha1("xyz123")|eval dec_number=tonumber(sha,16)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;but dec_number is returning nothing. Could anyone suggest something ?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 03:41:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-SHA1-value-to-integer-with-base-16/m-p/621478#M216026</guid>
      <dc:creator>aps</dc:creator>
      <dc:date>2022-11-21T03:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: Working with SHA1 value.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-SHA1-value-to-integer-with-base-16/m-p/621480#M216027</link>
      <description>&lt;P&gt;A SHA1 value would be an integer too big to represent in 64 bits, which probably is why &lt;FONT face="courier new,courier"&gt;tonumber&lt;/FONT&gt; fails.&lt;/P&gt;&lt;P&gt;What problem are you trying to solve?&lt;/P&gt;</description>
      <pubDate>Sun, 20 Nov 2022 14:35:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-SHA1-value-to-integer-with-base-16/m-p/621480#M216027</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-11-20T14:35:27Z</dc:date>
    </item>
    <item>
      <title>Re: Working with SHA1 value.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-SHA1-value-to-integer-with-base-16/m-p/621481#M216028</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i need to filter some events based on "string SHA1" &amp;gt; decimal[16] integer value's mode operations.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Something like -&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;(SHA_Value.&lt;/SPAN&gt;&lt;SPAN&gt;to_interger&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;16&lt;/SPAN&gt;&lt;SPAN&gt;) % &lt;/SPAN&gt;&lt;SPAN&gt;100&lt;/SPAN&gt;&lt;SPAN&gt;)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;i was checking if i could achieve it by using "tonumber" function with eval for mode operation. if you could suggest some other method or trick would be appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Nov 2022 15:38:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-SHA1-value-to-integer-with-base-16/m-p/621481#M216028</guid>
      <dc:creator>aps</dc:creator>
      <dc:date>2022-11-20T15:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: Working with SHA1 value.</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-SHA1-value-to-integer-with-base-16/m-p/621537#M216046</link>
      <description>&lt;P&gt;As&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/213957"&gt;@richgalloway&lt;/a&gt;&amp;nbsp;indicates, the problem is the scale of SHA1 that SPL cannot handle. &amp;nbsp;I did some test, and uncovered extremely buggy behavior when an integer approaches and exceeds 10 trillion, or 10^13. (&lt;A title="SPL freaks out near 10^13." href="https://community.splunk.com/t5/Splunk-Enterprise/What-are-limitations-of-numeric-calculation-representations/m-p/621502#M14566" target="_blank" rel="noopener"&gt;What are limitations of numeric calculation/representations?&lt;/A&gt;) &amp;nbsp;In comparison, SHA1 is 40 digits HEX. &amp;nbsp;Your best bet is an external command.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 08:51:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-SHA1-value-to-integer-with-base-16/m-p/621537#M216046</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2022-11-21T08:51:29Z</dc:date>
    </item>
  </channel>
</rss>

