This content has been marked as final. Show 4 replies
Could you please share any inputs in this regard?
If you look at the spec header for the DBMS_CRYPTO package it shows this note:
-- Prior to encryption, hashing or keyed hashing, CLOB datatype is
-- converted to AL32UTF8. This allows cryptographic data to be
-- transferred and understood between databases with different
-- character sets, across character set changes and between
-- separate processes (for example, Java programs).
I answered this question last week for a Java user in this forum article - see the last reply for the Java code change that was made
Re: MD5. DBMS_CRYPTO.Hash vs java.security.MessageDigest
I too have a problem where the MD5 value from DBMS_CRYPTO does not match a hash value from 3rd party MD5 tool (MD5 Checksum Calculator 0.0.5.58 or WinMD5Free v1.20). This occurs only on some of the XML files that I generate using DBMS_XSLPROCESSOR on a Linux OS. I added the both java functions(MD5 and MD5_UTF_8) to my package to what hash values they would produce but I get "ORA-29532: Java call terminated by uncaught Java exception: java.nio.BufferOverflowException " the XML is about 60mb. I copied MD5 and MD5_UTF_8 from the other post.
t_checksum := lower(RAWTOHEX(dbms_crypto.hash(src=>l_clob,typ=>dbms_crypto.hash_md5)));
l_hash := get_md5_CLOB (l_clob);
l_checksum_md5 := lower(rawtohex(l_hash));
l_hash := get_md5_UTF_8_CLOB (l_clob);
l_checksum_md5_UTF_8 := lower(rawtohex(l_hash));
Thank You in advance
Welcome to the forum!
Please do not HIJACK other users threads. This question has already been answered.
If you have a question or problem open your own thread and post the particulars, including your 4 digit Oracle version.
Do not respond or otherwise followup in this thread. Let it rest in peace. ;)