Thursday, January 5, 2012

Hashing values in Oracle Database


ORA_HASH( ) function allows you hash a value. This is one way hash meaning you cannot decrypt it back to its original value.

Example,

SELECT ORA_HASH(column_name) FROM table_name;

If you want to hash a particular string (not column value) then do it this way: 

SELECT ora_hash('some text') FROM DUAL;


This will hash the text 'some text' for you. The value you will get is: 2387593664 which is the hash of 'some text'.

No comments:

Post a Comment