# Crypto.SHA3\_256 returns wrong result on linux

**URL:** <https://forum.xojo.com/t/crypto-sha3-256-returns-wrong-result-on-linux/83654>\
**Category:** Bugs and Feature Requests\
**Created:** [December 19, 2024, 4:33am UTC](https://forum.xojo.com/t/crypto-sha3-256-returns-wrong-result-on-linux/83654 "2024-12-19T04:33:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Bombay](https://forum.xojo.com/user_avatar/forum.xojo.com/alex_bombay/32/224_2.png) [@Alex\_Bombay](https://forum.xojo.com/u/Alex_Bombay)\
**Post date:** [December 19, 2024, 4:33am UTC](https://forum.xojo.com/t/crypto-sha3-256-returns-wrong-result-on-linux/83654/1 "2024-12-19T04:33:13Z")

</div>

I think I just found a bug in the crypto library on linux.

I was trying to figure out why my program was not working and tracked it down to Crypto.SHA3\_256 returning the wrong result when compared to macOS and an online hash tool.

Am I missing something before I make a report?

**SHA2\_256**

`EncodeHex(Crypto.SHA2_256("test"))`

**macOS 14.2.1** : 9F86D081884C7D659A2FEAA0C55AD015A3BF4F1B2B0B822CD15D6C15B0F00A08  
**Debian 12.8** : 9F86D081884C7D659A2FEAA0C55AD015A3BF4F1B2B0B822CD15D6C15B0F00A08

**Online** : 9F86D081884C7D659A2FEAA0C55AD015A3BF4F1B2B0B822CD15D6C15B0F00A08

**SHA3\_256**

`EncodeHex(Crypto.SHA3_256("test"))`

**macOS 14.2.1** : 36F028580BB02CC8272A9A020F4200E346E276AE664E45EE80745574E2F5AB80  
**Debian 12.8** : 9C22FF5F21F0B81B113E63F7DB6DA94FEDEF11B2119B4088B89664FB9A3CB658

**Online** : 36F028580BB02CC8272A9A020F4200E346E276AE664E45EE80745574E2F5AB80

---

<div class="post-metadata">

**Author:** ![AlbertoD](https://forum.xojo.com/letter_avatar_proxy/v4/letter/a/dbc845/32.png) [@AlbertoD](https://forum.xojo.com/u/AlbertoD)\
**Post date:** [December 19, 2024, 1:41pm UTC](https://forum.xojo.com/t/crypto-sha3-256-returns-wrong-result-on-linux/83654/2 "2024-12-19T13:41:44Z")

</div>

Did you create an [Issue](https://xojo.com/issues)?

---

<div class="post-metadata">

**Author:** ![Alex\_Bombay](https://forum.xojo.com/user_avatar/forum.xojo.com/alex_bombay/32/224_2.png) [@Alex\_Bombay](https://forum.xojo.com/u/Alex_Bombay)\
**Post date:** [December 19, 2024, 2:28pm UTC](https://forum.xojo.com/t/crypto-sha3-256-returns-wrong-result-on-linux/83654/3 "2024-12-19T14:28:56Z")

</div>

Not yet, just checking if I was missing something.

---

<div class="post-metadata">

**Author:** ![Alex\_Bombay](https://forum.xojo.com/user_avatar/forum.xojo.com/alex_bombay/32/224_2.png) [@Alex\_Bombay](https://forum.xojo.com/u/Alex_Bombay)\
**Post date:** [December 19, 2024, 2:39pm UTC](https://forum.xojo.com/t/crypto-sha3-256-returns-wrong-result-on-linux/83654/4 "2024-12-19T14:39:11Z")

</div>

[https://tracker.xojo.com/xojoinc/xojo/-/issues/78133](https://tracker.xojo.com/xojoinc/xojo/-/issues/78133)
