1

I would like to use a different encryption algorithm than the default md5 algorithm in Magento and am looking at a good way to implement this.

Currently I made an extension which features its own encryption class, replacing the Mage_Core_Model_Encryption class in the config. This works succesfully, but there is a small problem. My encryption uses more than the 40 characters allowed for a password in the database.

How would I go and modify this value in a correct way?

Make a setup file in my extension which modifies the admin_user table?
- or -
Overwrite the setup/install file for Mage_Admin_Model_User and modify the table to my needs?
(- or - not what I would like, but the easiest: modify it manually in the database)

I am confused..

Lucas Moeskops
  • 5,445
  • 3
  • 28
  • 42

1 Answers1

1

The first option - "Make a setup file in my extension" - makes the most sense to me.

Also see how to alter a table without SQL.

Community
  • 1
  • 1
clockworkgeek
  • 37,650
  • 9
  • 89
  • 127
  • Yes, you are right. I am not sure however if it is meant to change core databases? If my script is executed before the core script (which I assume it is as local precedes core), the core script will then drop and recreate the table I expect. So I would actually want my extension to be some sort of upgrade to core/admin.. – Lucas Moeskops Feb 01 '11 at 12:15
  • 1
    Assuming your extension isn't being added after normal installation has completed then you can ensure it runs last by adding `` in your `app/etc/modules/*.xml` file. I'm not sure local modules precede core in respect to setups, just that their classes take precedence. – clockworkgeek Feb 01 '11 at 13:24
  • 1
    @Lucasmus, local module setup scripts always run after core ones. The same for community scripts. So it doesn't make sense to add depends on core modules. – Ivan Chepurnyi Feb 01 '11 at 13:48