Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Modify the sql file below, make the logic to use the Advanced Encryption Standard (AES) 256-bit Encryption Algorithm. Also modify the procedure to decrypt and

Modify the sql file below, make the logic to use the Advanced Encryption Standard (AES) 256-bit Encryption Algorithm.

Also modify the procedure to decrypt and print the Decrypted SSN value.

Use UTL_I18N.RAW_TO_CHAR to convert RAW to a VARCHAR2 string, so you can print it.

Can you help me with how exactly we are supposed to edit the file?

SET SERVEROUTPUT ON SET ECHO ON DECLARE ssn VARCHAR2(20) := '555 55 5555'; ssn_raw RAW (100) := UTL_RAW.cast_to_raw(ssn); num_key_bytes NUMBER := 128/8; key_bytes_raw RAW (16); encryption_type NUMBER := DBMS_CRYPTO.ENCRYPT_AES128 + DBMS_CRYPTO.CHAIN_CBC + DBMS_CRYPTO.PAD_PKCS5; encrypted_raw RAW (2000); BEGIN DBMS_OUTPUT.put_line('The Unencrypted SSN is: ' || ssn); key_bytes_raw := DBMS_CRYPTO.RANDOMBYTES (num_key_bytes); encrypted_raw := DBMS_CRYPTO.encrypt( src => ssn_raw, typ => encryption_type, key => key_bytes_raw); DBMS_OUTPUT.put_line('The Encrypted SSN is: ' || RAWTOHEX(UTL_RAW.cast_to_raw(encrypted_raw))); DBMS_OUTPUT.put_line('The Decrypted SSN is: '); END; / 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Database Modeling With Neo4j

Authors: Ajit Singh

2nd Edition

B0BDWT2XLR, 979-8351798783

Students also viewed these Databases questions

Question

Identify the cause of a performance problem. page 380

Answered: 1 week ago