Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8113219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T02:45:32+00:00 2026-06-06T02:45:32+00:00

Possible Duplicate: Is there any hash function in PL/SQL? I have a column with

  • 0

Possible Duplicate:
Is there any hash function in PL/SQL?

I have a column with NCLOB database type in Oracle 11g. I need to get a hash value for its content. How can I do this using any built-in Oracle function or inside a PL/SQL SP in Oracle?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T02:45:35+00:00Added an answer on June 6, 2026 at 2:45 am

    Yes: hashing and encrypting (related but not exactly the same) are all done via the SYS package DBMS_CRYPTO.

    Simple SHA-1 Hashing

    l_hash := dbms_crypto.hash( l_src, dbms_crypto.HASH_SH1 );
    

    Simple MD5 Hashing

    l_hash := dbms_crypto.hash( l_src, dbms_crypto.HASH_MD5 );
    

    Overview of dbms_crypto.hash()

    The hash() function is overloaded to accept the following types: RAW, BLOB, and CLOB. According to the implicity data conversions for raw acceptable input types are RAW, CHAR, VARCHAR2, NCHAR, NVARCHAR2, LONG, BLOB. All other data types (DATE, TIMESTAMP, etc) not covered under RAW/implicit RAW conversion, BLOB, and CLOB will have to be passed through TO_CHAR() first.

    It is worth noting that dbms_crypto.hash() supports the following hashing algorithms:

    • HASH_MD4
    • HASH_MD5
    • HASH_SH1

    Passwords: Just In Case

    If you are storing passwords, I suggest that you use a password storage hash (bcrypt, PBKDF2, or scrypt) instead of a cryptographic hash (md5, sha-1, etc). The difference is that password storage hashes are meant to take time to break while cryptographic hashes are meant to be done quickly. When attacking a system’s password list via brute force it orders of magnitude more time intensive when attempting to break a salted value that is passed through a cryptographic algorithm. Consider that using a password hash on a single value can take ~100ms (not much for a single authentic login), but very slow for a brute force (millions/billions of attempts per password) over your entire password list.

    Oracle Hates Password Hashes

    For what its worth I am not aware of any packages from Oracle that provide password hashing support. You can however accomplish this by using ‘loadjava‘ and putting a Java bcrypt implementation within the JVM that runs withing Oracle’s RDBMS. You can then use a PL/SQL wrapper to call your Java class that implements bcrypt. If you are using a middle-tier you can use many other options available to you in that language (.NET, PHP, Perl, Ruby, Python, Java, etc) and skip trying to use ‘loadjava’.

    I meant encryption not hashes!

    In case the hashing you need is not covered by dbms_crypto.hash(), you might be looking for encryption via dbms_crypto.encrypt which works very similarly except that it takes in the following types:

    • ENCRYPT_DES
    • ENCRYPT_3DES_2KEY
    • ENCRYPT_3DES
    • ENCRYPT_AES
    • ENCRYPT_PBE_MD5DES
    • ENCRYPT_AES128
    • ENCRYPT_AES192
    • ENCRYPT_AES256

    Here is the full 11gR2 documentation on DBMS_CRYPTO. All other versions are available via tahiti.oracle.com. Just click on your version and then search for ‘dbms_crypto’.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Is there a PHP function to remove any/all key/value pairs that have
Possible Duplicate: Is there any working memory profiler for Python3 I have some script
Possible Duplicate: Select xml node by attribute in php Is there any function like
Possible Duplicate: Is there any way to get the size of a c function?
Possible Duplicate: Is there any way to determine text direction from CultureInfo in asp.net?
Possible Duplicate: Is there any reason to use the 'auto' keyword in C /
Possible Duplicate: Overriding the power button in Android Is there any possible way I
Possible Duplicate: Objective C for Windows iPhone development on Windows Is there any way
Possible Duplicate: Concatenate Two NSDate String values Just confused that is there any default
Possible Duplicate: Porting VB.NET Winforms Application to C# Is there any way to convert

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.