Hi guys,
I need to anonymise some data; Some of it in an Oracle database and some in text files. I'm using the 'digest' command on Solaris 10 OS and an Oracle function to encode the data in the database. However, as a test, when i try to encode the same string in the dataabse ans OS, I get different values:
echo hello|digest -a md5
b1946ac92492d2347c6235b4d2611184
select SYS.DBMS_CRYPTO.HASH(UTL_I18N.STRING_TO_RAW(LOWER('hello'),'AL32UTF8'),2) from dual;
5D41402ABC4B2A76B9719D911017C592
After checking some online MD5 generators, all the online encoder produce
"5D41402ABC4B2A76B9719D911017C592" as the value.
I would like to know, why there's a difference in values?
I'm guessing it may have something to do with the characterset:
> locale
LANG=
LC_CTYPE=en_GB.ISO8859-1
LC_NUMERIC=en_GB.ISO8859-15
LC_TIME="C"
LC_COLLATE=en_GB.ISO8859-15
LC_MONETARY=en_GB.ISO8859-15
LC_MESSAGES=C
LC_ALL=
What would i need to change at the OS level so that both DB and OS produce same MD5 values?
Thanks in advance,
Zaff
