dbms_obfuscation_toolkit.md5 migration issue
564011Feb 26 2007 — edited Feb 27 2007I am working on an application migration from Oracle9i Enterprise Edition Release 9.2.0.2.0 to Oracle9i Enterprise Edition Release 9.2.0.5.0.
This application stores user passwords as varchar hash values of dbms_obfuscation_toolkit.md5 encryption.
I noticed a serious issue when running the following simple test:
========================
set serveroutput on
declare
v_input varchar2(2000) := 'test';
md5key varchar2(32) := null;
begin
md5key := dbms_obfuscation_toolkit.md5(input_string => v_input);
dbms_output.put_line('Hash for "' || v_input || '" is "' || md5key ||'".');
end;
========================
The output for 9.2.0.2.0 is:
Hash for "test" is " ¿kÍF!ÓsÊÞN¿&'´ö".
The output for 9.2.0.5.0 is DIFFERENT and is:
Hash for "test" is " ¿k¿!¿¿N¿&'¿".
Can anyone tell me why in the world dbms_obfuscation_toolkit.md5 is returning different results and how to correct this so that all the application password hash data will not be lost?
Thank you.