Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle 21c dbms_obfuscation_toolkit de-supported...Trying dbms_crypto

PhilMan2Jan 3 2022

I'm using Oracle 21c on Windows 11.
I'm converting from database version 18 to 21. I ran into a problem with a function I had using dbms_obfuscation.

FUNCTION hash_password(p_password VARCHAR2)
 RETURN VARCHAR2
As
 l_key VARCHAR2(20) := 'not_my_real_key';
BEGIN
/* RETURN dbms_obfuscation_toolkit.md5(input => utl_raw.cast_to_raw( p_password || l_key));*/
 RETURN dbms_crypto.encrypt(input => utl_raw.cast_to_raw( p_password || l_key));
 --l_key is concatenated with p_password and hashed together to generate a secured password.
END hash_password;

I've tried using DBMS_CRYPTO.ENCRYPT but I get stuck at the Encryption Type parameter. How would I use DBMS_CRYPTO to encrypt the password similar to above? Also, can I use DBMS_CRYPTO in a manner that will read the passwords maintained by DBMS_OBFUSCATION_TOOLKIT?

This post has been answered by Mike Kutz on Jan 3 2022
Jump to Answer
Comments
Post Details
Added on Jan 3 2022
4 comments
5,836 views