[ACCEPTED]-Is there any hash function in PL/SQL?-oracle-sqldeveloper

Accepted answer
Score: 24

Depending on why you're trying to generate 5 the hash, the built-in function ORA_HASH 4 may be sufficient,

SQL> select ora_hash( 'fuzzy bunny' ) from dual;

ORA_HASH('FUZZYBUNNY')
----------------------
            2519249214

I wouldn't try to use 3 this if you need a cryptographically secure 2 hash function. But if you just need a simple 1 hash, this should be sufficient.

Score: 15

Make sure that you have the appropriate 9 permissions granted to the user that you 8 are connecting with. Talk to your DBA to 7 add the execute permission on the SYS.DBMS_CRYPTO 6 package.

Oracle provides a nice guide on working 5 with hashed and encrypted data using the 4 oracle database.

If you are on an older version 3 of the database that doesn't support DBMS_CRYPTO, you 2 can also try DBMS_OBFUSCATION_TOOLKIT.

In 1 Oracle 12c you can use the function STANDARD_HASH.

More Related questions