In both Oracle and PostgreSQL I can get an MD5 hash value for any given string. For example In Oracle 11gR2: SQL> select rawtohex( DBMS_CRYPTO.Hash (utl_raw.cast_to_raw('xyz'),2) ) as hash_val from dual; HASH_VAL -------------------------------- D16FB36F0911F878998C136191AF705E and in PostgreSQL 9.6: ft_node=# select md5('xyz') as hash_val; hash_val ---------------------------------- d16fb36f0911f878998c136191af705e (1 row) As you see, apart from the case, the values match. How can I get similar functionality in SQL Anywhere 17 ? |
It's called hash and it works thusly: SELECT hash ( 'xyz', 'MD5' ) AS hash_val; hash_val d16fb36f0911f878998c136191af705e 3
...and it also offers much better hash algorithms than MD5, say SHA256...
(27 Aug '17, 16:13)
Volker Barth
|