Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

DBMS_CRYPTO returning a different hash a week later

I've been using this function to hash passwords for years without issue. On a new client, the hash suddenly changes about a week later. This causes the comparison with the stored password hash to fail when trying to authenticate users. Anyone have any ideas of what might be happening?

This is on a newly installed Database XE 21.

create or replace FUNCTION "HASH_PASSWORD" (p_user_name in varchar2, p_password in varchar2) return varchar2 is
l_password varchar2(255);
l_salt varchar2(255) := '9XfDo10Tn2grxTz5Z5ZbIdaQfZm3SlEtDU4KQSQZ5h53HvpXEW';
begin
l_password := utl_raw.cast_to_raw(dbms_crypto.hash(UTL_I18N.STRING_TO_RAW (p_password||substr(l_salt,4,14)||p_user_name||substr(l_salt, 5, 10), 'AL32UTF8'), dbms_crypto.HASH_MD5));
return l_password;
end;
/

Comments

Rolla Mimy

Hi Maria,

You can add the QUERY parameter in your parfile.

dumpfile=test.dmp logfile=test.log directory=DIR QUERY= “select .. union ..”

Kinds

1 - 1

Post Details

Added on Feb 18 2025
0 comments
41 views