Skip to Main Content

SQL & PL/SQL

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!

decrypt given key phrase

Frank LehmannJul 20 2022

Hi developers,
i am in need of a decrypt function for a given key.
The documentation says, that the given key is encrypted with:
AES-128 algorithm with CBC (Cipher Block Chaining) and PKCS#5 padding. This algorithm uses a Secret Key, that is generated using PBKDF2
When i use the dbms_crypto package to decrypt this key, it looks like this:

da:='m9GN+yUaslODjRFkVwFzhumb/VEB1POJWzLre75P/xYWtQISrUACNtAZYg1Vu/Vp'

 select DBMS_CRYPTO.DECRYPT(
  src=>:da,
  typ =>4358,
  key =>UTL_ENCODE.BASE64_DECODE(utl_raw.cast_to_raw(('c17b2d6e5bb0dc1f3c17ef37ce918d8a')),
  iv => null)
 from dual
The key was sent before this decryption must be done.
The da value is the key phrase to decrypt.
But when execute this select i get an error :
ORA-01465: Ungültige Hexadezimalzahl
Why i get this error ?

Comments
Post Details
Added on Jul 20 2022
12 comments
697 views