<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>How to use HASH?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/51019/how-to-use-hash</link><description>Hi. I&amp;#39;m using nRF52832, SDK13.0.0. 
 I want tuse SHA256 abd MD5. 
 Could you let me know which function is for SHA256 and MD5? 
 Actually I&amp;#39;ve tried my code as below. 
 uint8_t p_init_cmd[32]; uint32_t init_cmd_len = 32; 
 for(int i=0;i&amp;lt;32;i++) p_init_cmd</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 15 Aug 2019 13:13:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/51019/how-to-use-hash" /><item><title>RE: How to use HASH?</title><link>https://devzone.nordicsemi.com/thread/204317?ContentTypeID=1</link><pubDate>Thu, 15 Aug 2019 13:13:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a700f32-f066-4899-9ec5-5ed77ea4922c</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Let us continue in this thread (rather than the two duplicate ones).&lt;/p&gt;
&lt;p&gt;In one of the duplicate questions, you wrote that you get&amp;nbsp;0x6 returned from the call to&amp;nbsp;nrf_crypto_hash_compute() when doing MD5. This is&amp;nbsp;NRF_ERROR_NOT_SUPPORTED, and is expected since MD5 is only supported by the CC310 backend that is available on the nRF52840. It is not supported on the SW backend that is used for nRF52832.&lt;/p&gt;
&lt;p&gt;Regarding SHA-256 I don&amp;#39;t spot the problem. Can you share a complete piece of code that I can try on my end?&lt;/p&gt;
&lt;p&gt;By the way, are you limited to using SDK 13 for some reason? Among many other improvements, the nrf_crypto library was reworked and greatly improved in SDK 15.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to use HASH?</title><link>https://devzone.nordicsemi.com/thread/204190?ContentTypeID=1</link><pubDate>Thu, 15 Aug 2019 06:12:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ec6b4fb-c987-46c5-b2ed-5275da47c6f7</guid><dc:creator>roger.k</dc:creator><description>&lt;p&gt;And init is below.&lt;/p&gt;
&lt;p&gt;NRF_CRYPTO_HASH_CREATE(init_packet_hash, SHA256);&lt;br /&gt;NRF_CRYPTO_HASH_CREATE(init_packet_md5, MD5);&lt;/p&gt;
&lt;p&gt;const nrf_crypto_hash_info_t hash_info_sha256 =&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .hash_type = NRF_CRYPTO_HASH_TYPE_SHA256,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .endian_type = NRF_CRYPTO_ENDIAN_LE&lt;br /&gt;};&lt;/p&gt;
&lt;p&gt;const nrf_crypto_hash_info_t hash_info_MD5 =&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .hash_type = NRF_CRYPTO_HASH_TYPE_MD5,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; .endian_type = NRF_CRYPTO_ENDIAN_LE&lt;br /&gt;};&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>