Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8338245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T04:31:58+00:00 2026-06-09T04:31:58+00:00

I want to override/extend Mage_Core_Encryption_Model to handle Legacy Passwords. I’m migrating old sites data

  • 0

I want to override/extend Mage_Core_Encryption_Model to handle Legacy Passwords.

I’m migrating old sites data into magento. My old site encryption method is Sha-1. but magento use md5 + text in core encryption method. I have changed the core module manually and migrate correctly but now i want to create a custom module for that (migrate without encryption, after migration override the md5 method by sha-1)

How can I create a custom module for that that overwrites the core code I have changed?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T04:31:59+00:00Added an answer on June 9, 2026 at 4:31 am

    If I understand correctly, you need a module to replace the md5 hash mechanism in Magento with sha1?

    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 – https://github.com/drewhunter/BetterHash – you would obviously need to slightly modify it to handle sha1)

    So essentially you need to override the hash() method of Mage_Core_Model_Encryption

    Your modules config.xml will require the following:

    File: app/code/local/Yourcompany/Yourmodule/etc/config.xml

    <?xml version="1.0"?>
    
    <config>
        <modules>
            <Yourcompany_Yourmodule>
                <version>1.0.0</version>
            </Yourcompany_Yourmodule>
        </modules>
        <global>
            <helpers>
                <core>
                    <encryption_model>Yourcompany_Yourmodule_Model_Hash</encryption_model>
                </core>  
            </helpers>
        </global>
    </config>
    

    Then to take advantage of the rewrite:

    File: app/code/local/Yourcompany/Yourmodule/Model/Hash.php

    <?php
    
    class Yourcompany_Yourmodule_Model_Hash extends Mage_Core_Model_Encryption
    {
        public function hash($data)
        {
            return sha1($data);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In Kohana 3, how can I override/extend a module class? E.g. I want to
I have a Panel which I want to extend and override MeassureOverride and Arrange
I have: 1. inetpub/wwwroot/ProjectName/Application.cfc 2. inetpub/wwwroot/ProjectName/Admin/Application.cfc I want #2 to extend #1 and override
I want to extend the GroupPrincipal class to handle some custom properties: using System.DirectoryServices.AccountManagement;
Hello friend i need to over ride magento core controller i want to override
When I extend a class I want to override methods and change their accessibility
I want to extend a class from TextBox component of C# and override an
I want to override the SubmitChanges() method for my model. Whern I try to
I want to override the Tostring() method for changing some characters. Is it possible?
I want to override the validation_errors() method of the form helper in CodeIgniter for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.