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?