How to encrypt a CLOB datatype in JDBC?


Creating an Encrypted LOB(CLOB or, BLOB)

Oracle database from 11g onwards provides SecureFiles feature to encrypt the Large object files (LOBs). You can create a secure file using the SECUREFILE keyword as −

CREATE TABLE table_name (
   myClob CLOB
)
LOB(myClob) STORE AS SECUREFILE;

You can encrypt a secured file using Encrypt option for encryption you can use 3DES168 or, AES128 or, AES192 or, AES256 algorithm.

CREATE TABLE encrypt_tab (
   myClob CLOB
)
LOB(myClob) STORE AS SECUREFILE encrypt_lob(
   ENCRYPT USING 'AES256'
);

Updated on: 30-Jul-2019

195 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements