Oracle 10.2.0.5.0
Windows 2003 R2 Standard Edition 32 bit
Note: This probably is a question for Microsoft forums but I just wanted to seek inputs from this forum first.
Used following piece of code
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> SET SERVEROUT ON
SQL>
SQL> DECLARE
2 sRAWString RAW (32767) := UTL_RAW.CAST_TO_RAW ('1234567890');
3 BEGIN
4 DBMS_OUTPUT.put_line (SYS.DBMS_CRYPTO.HASH (sRAWString, SYS.DBMS_CRYPTO.HASH_MD5));
5 END;
6 /
E807F1FCF82D132F9BB018CA6738A19F
PL/SQL procedure successfully completed.
Wrote similar piece of code from .NET and the output does not match.
byte[] data = Encoding.ASCII.GetBytes("1234567890");
HashAlgorithm hA = MD5.Create() as HashAlgorithm;
data = hA.ComputeHash(data);
string ABC = Encoding.ASCII.GetString(data);
The byte array before the ComputeHash call is "23272412522484519471551762420210356161159".
Also the output that we receive from .NET cannot be displayed in our current Windows code page/font (square boxes and inverted question marks.
Could you please share any inputs in this regard?