How to Use Correctly DBMS_CRYPTO.HASH With Clob and Raw Input?
(Doc ID 760247.1)
Last updated on FEBRUARY 04, 2022
Applies to:
Oracle Database - Enterprise Edition - Version 10.2.0.3 and laterOracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Information in this document applies to any platform.
Information in this document applies to any platform.
Goal
When using the dbms_crypto.hash procedure, it is easy to overlook how this actually works and obtain the undesired results. Below is one example of such possible scenarios.
The scenario assumes that the database character set is not AL32UTF8 or UTF8 and that the character set is one Western European character set (assume WE8MSWIN1252), but the same can happen for any other characterset.
Trying to encrypt the same character (Ö), it appears that the procedure returns different results for the same character, when the character is over codepoint 127.
It is also good to mention that this procedure is deterministic, so it should return for the same input the same output.
Solution
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Goal |
Solution |
References |