Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If I understand correctly, you need a module to replace the md5 hash mechanism in Magento with sha1?</p> <p>I wont go into creating an entire module here, but simply the key parts. If you are interested though as a complete example to reference, I created a module a while back which replaces the md5 hash with sha512 that you can look at - <a href="https://github.com/drewhunter/BetterHash">https://github.com/drewhunter/BetterHash</a> - you would obviously need to slightly modify it to handle sha1)</p> <p>So essentially you need to override the <a href="https://github.com/LokeyCoding/magento-mirror/blob/magento-1.7/app/code/core/Mage/Core/Model/Encryption.php#L83">hash()</a> method of <code>Mage_Core_Model_Encryption</code></p> <p>Your modules config.xml will require the following:</p> <p><strong>File:</strong> app/code/local/Yourcompany/Yourmodule/etc/config.xml</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;config&gt; &lt;modules&gt; &lt;Yourcompany_Yourmodule&gt; &lt;version&gt;1.0.0&lt;/version&gt; &lt;/Yourcompany_Yourmodule&gt; &lt;/modules&gt; &lt;global&gt; &lt;helpers&gt; &lt;core&gt; &lt;encryption_model&gt;Yourcompany_Yourmodule_Model_Hash&lt;/encryption_model&gt; &lt;/core&gt; &lt;/helpers&gt; &lt;/global&gt; &lt;/config&gt; </code></pre> <p>Then to take advantage of the rewrite:</p> <p><strong>File:</strong> app/code/local/Yourcompany/Yourmodule/Model/Hash.php</p> <pre><code>&lt;?php class Yourcompany_Yourmodule_Model_Hash extends Mage_Core_Model_Encryption { public function hash($data) { return sha1($data); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload