How to generate a MD5 hash
On Microsoft SQL Server
SQL> SELECT HASHBYTES('MD5', source)....
Source: varchar, nvarchar, ou varbinary, 8000 chars max.
On Oracle
PL/SQL> myhash := dbms_crypto.hash( source, dbms_crypto.HASH_MD5 );
SQL> select dbms_crypto.hash(utl_raw.cast_to_raw(source),2) ...
Source: RAW, BLOB, et CLOB. With implicite conversion, you can also use CHAR, VARCHAR2, NCHAR, NVARCHAR2 et LONG.
On Sybase
sybase> SELECT HASHBYTES('MD5', source)....
On MySQL
mysql> SELECT MD5(source) ....
SQL> SELECT HASHBYTES('MD5', source)....
Source: varchar, nvarchar, ou varbinary, 8000 chars max.
On Oracle
PL/SQL> myhash := dbms_crypto.hash( source, dbms_crypto.HASH_MD5 );
SQL> select dbms_crypto.hash(utl_raw.cast_to_raw(source),2) ...
Source: RAW, BLOB, et CLOB. With implicite conversion, you can also use CHAR, VARCHAR2, NCHAR, NVARCHAR2 et LONG.
On Sybase
sybase> SELECT HASHBYTES('MD5', source)....
On MySQL
mysql> SELECT MD5(source) ....
Comments