# Zero after decimal while creating SHA-256 hash

**URL:** <https://community.postman.com/t/zero-after-decimal-while-creating-sha-256-hash/39938>\
**Category:** Help Hub\
**Tags:** scripts, crypto\
**Created:** [October 11, 2022, 5:38am UTC](https://community.postman.com/t/zero-after-decimal-while-creating-sha-256-hash/39938 "2022-10-11T05:38:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anishkandel100](https://avatars.discourse-cdn.com/v4/letter/a/858c86/32.png) [@anishkandel100](https://community.postman.com/u/anishkandel100)\
**Post date:** [October 11, 2022, 5:38am UTC](https://community.postman.com/t/zero-after-decimal-while-creating-sha-256-hash/39938/1 "2022-10-11T05:38:37Z")

</div>

I was creating SHA-256 hash, is it necessary to write zero after decimal. when I create hash with not mentioning zeros after decimal like (only 11), it works but if I create hash with mentioning zeros after a integer like “11.00”, it’s not working resulting signature invalid.

Image case 1(not working with hash signature with zero as decimals)

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/4/c/4c9d81421c1b19b6521aaed999a3fbcf911dce76.png)  
 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/b/3/b3080fc8927d4eab1622731aacaf2811a4722c24.png)

image case 2( working with hash signature created of only integer (not zeros after decimals)

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/4/1/417a68ca3805c8f6d2edddbf1a3921037fa54911.png)

---

<div class="post-metadata">

**Author:** ![w4dd325](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/w4dd325/32/12436_2.png) [@w4dd325](https://community.postman.com/u/w4dd325)\
**Post date:** [October 11, 2022, 4:05pm UTC](https://community.postman.com/t/zero-after-decimal-while-creating-sha-256-hash/39938/2 "2022-10-11T16:05:46Z")

</div>

Hi @anishkandel100

I’m not that knowledgeable about cryptography but I would guess this is due to the number being a floating point.

There can be discrepancies with rounding and this could be what is causing your hash to fail.

There is a good write-up here that might help explain;

> <https://crypto.stackexchange.com/questions/2715/do-cryptographic-hashing-algorithms-operate-only-on-integers>

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [September 1, 2023, 11:13am UTC](https://community.postman.com/t/zero-after-decimal-while-creating-sha-256-hash/39938/3 "2023-09-01T11:13:27Z")

</div>

Closed on September 1, 2023, 11:13am UTC


