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!

How to decrypt the encrypted code.

paraprSep 6 2016 — edited Sep 6 2016

Hi,

I have existing code for encrypting the data.

Now i want to decrypt the encrypted code.

Note that I Can't change the existing encryption logic.

Database Version :- 11.2.0.3.0 (64 Bit).

Below is the logic for encryption.

DECLARE

   v_hash_pin        VARCHAR2 (100);

   v_encrypted_pin   VARCHAR2 (200);

   chk               VARCHAR2 (2000);

BEGIN

   chk := DBMS_OBFUSCATION_TOOLKIT.md5 (input_string => 4521);

   v_hash_pin := RAWTOHEX (UTL_RAW.cast_to_raw (chk));

   DBMS_OUTPUT.put_line ('hash pin ' || v_hash_pin);

   DBMS_OBFUSCATION_TOOLKIT.DESEncrypt (input_string       => v_hash_pin,

                                        key_string         => 'ABCDEFGEHI',

                                        encrypted_string   => v_encrypted_pin);

   DBMS_OUTPUT.put_line ('encrypted pin ' || v_encrypted_pin);

END;

Thanks in Advance.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 4 2016
Added on Sep 6 2016
8 comments
2,147 views