I'm working on web application in asp.net with oracle Database12c I'm using aes128 stored procedure to encrypt the password here is the procedure that makes encryption
- SET SERVEROUTPUT ON;
- DECLARE
- l_user_id test.username%TYPE := 'SCOTT';
- l_user_psw VARCHAR2 (2000) := 'mypassword123';
- l_key VARCHAR2 (2000) := '1234567890999999';
- l_mod NUMBER
- := DBMS_CRYPTO.ENCRYPT_AES128
- + DBMS_CRYPTO.CHAIN_CBC
- + DBMS_CRYPTO.PAD_PKCS5;
- l_enc RAW (2000);
- BEGIN
- l_user_psw :=
- DBMS_CRYPTO.encrypt (UTL_I18N.string_to_raw (l_user_psw, 'AR8MSWIN1256'),
- l_mod,
- UTL_I18N.string_to_raw (l_key, 'AR8MSWIN1256'));
- DBMS_OUTPUT.put_line ('Encrypted=' || l_user_psw);
- INSERT INTO test VALUES (l_user_id, l_user_psw);
- dbms_output.put_line('done');
- COMMIT;
- END;
the result is
- 132BEDB1C2CDD8F23B5A619412C27B60

Jignesh KumarPosted Sep 17, 2020, 4:16 AM