I\'m looking for a Hash function in PL/SQL, to get the hash of a varchar. I found a package in Oracle 10 called dbms_crypto with a function dbms_crypto.hash and even other p
Make sure that you have the appropriate permissions granted to the user that you are connecting with. Talk to your DBA to add the execute permission on the SYS.DBMS_CRYPTO package.
Oracle provides a nice guide on working with hashed and encrypted data using the oracle database.
If you are on an older version of the database that doesn't support DBMS_CRYPTO, you can also try DBMS_OBFUSCATION_TOOLKIT.
In Oracle 12c you can use the function STANDARD_HASH.
Depending on why you're trying to generate the hash, the built-in function ORA_HASH may be sufficient,
SQL> select ora_hash( 'fuzzy bunny' ) from dual;
ORA_HASH('FUZZYBUNNY')
----------------------
2519249214
I wouldn't try to use this if you need a cryptographically secure hash function. But if you just need a simple hash, this should be sufficient.