Oracle DBMS_OBFUSCATION_TOOLKIT
Version 18.3.0.1

General Information
Library Note Morgan's Library Page Header
Coming to OpenWorld 2018? Be sure to visit the TidalScale booth in Moscone South and learn how to solve performance problems and lower costs with Software Defined Servers. Before you visit the booth, or if you can't make it this year, check out TidalScale at www.tidalscale.com. Be sure to click on the Solutions link and look through the Oracle resources.
Purpose A predecessor to DBMS_CRYPTO the DES and MD5 algorithms are too weak to be worthy of any use and, as can be observed in the two written demos, the package is no longer functional. The corresponding dbms_obfuscation_toolkit_ffi objects are still functional.
AUTHID DEFINER
Constants
Name Data Type Value
Triple DES modes
TwoKeyMode INTEGER 0
ThreeKeyMode INTEGER 1
Data Types SUBTYPE varchar2_checksum IS VARCHAR2(16);

SUBTYPE raw_checksum IS RAW(16);
Dependencies
BSLN MGWI_CRYPTO UTL_RAW
DBMS_OBFUSCATION_TOOLKIT_FFI    
Documented Not in this version
Exceptions
Error Code Reason
ORA-28236 InvalidTripleDESMode
First Available 18.1.0.0
Security Model Owned by SYS with EXECUTE granted to PUBLIC
Source {ORACLE_HOME}/rdbms/admin/dbmsobtk.sql
Subprograms
DES3DECRYPT DESDECRYPT DESGETKEY
DES3ENCRYPT DESENCRYPT MD5
DES3GETKEY    
 
DES3DECRYPT

Triple DES Decryption

Overload 1

dbms_obfuscation_toolkit.des3Decrypt(
input          IN  RAW,
key            IN  RAW,
decrypted_data OUT RAW,
which          IN  PLS_INTEGER DEFAULT TwoKeyMode,
iv             IN  RAW         DEFAULT NULL);

TBD

Overload 2 dbms_obfuscation_toolkit.des3Decrypt(
input IN RAW,
key   IN RAW,
which IN PLS_INTEGER DEFAULT TwoKeyMode,
iv    IN RAW         DEFAULT NULL)
RETURN RAW;
DECLARE
 inpVal RAW(32767) := utl_raw.cast_to_raw('N0Way1n');
 keyVal RAW(32767) := utl_raw.cast_to_raw('Sch1age');
 retVal RAW(32767);
BEGIN
  retVal := dbms_obfuscation_toolkit.des3Decrypt(inpVal, keyVal,  TwoKeyMode);
  dbms_output.put_line(retVal);
END;
/
retVal := dbms_obfuscation_toolkit.des3Decrypt(inpVal, keyVal);
*
ERROR at line 6:
ORA-06550: line 6, column 13:
PLS-00307: too many declarations of 'DES3DECRYPT' match this call
ORA-06550: line 6, column 3:
PL/SQL: Statement ignored
Overload 3 dbms_obfuscation_toolkit.des3Decrypt(
input_string     IN  VARCHAR2,
key_string       IN  VARCHAR2,
decrypted_string OUT VARCHAR2,
which            IN  PLS_INTEGER DEFAULT TwoKeyMode,
iv_string        IN VARCHAR2     DEFAULT NULL);
TBD
Overload 4 dbms_obfuscation_toolkit.des3Decrypt(
input_string IN VARCHAR2,
key_string   IN VARCHAR2,
which        IN PLS_INTEGER DEFAULT TwoKeyMode,
iv_string    IN VARCHAR2    DEFAULT NULL)
RETURN VARCHAR2;
TBD
 
DES3ENCRYPT
Triple DES Encryption

Overload 1
dbms_obfuscation_toolkit.des3Encrypt(
input          IN  RAW,
key            IN  RAW,
encrypted_data OUT RAW,
which          IN  PLS_INTEGER DEFAULT TwoKeyMode,
iv             IN  RAW         DEFAULT NULL);
TBD
Overload 2 dbms_obfuscation_toolkit.des3Encrypt(
input IN RAW,
key   IN RAW,
which IN PLS_INTEGER DEFAULT TwoKeyMode,
iv    IN RAW         DEFAULT NULL)
RETURN RAW;
TBD
Overload 3 dbms_obfuscation_toolkit.des3Encrypt(
input_string     IN  VARCHAR2,
key_string       IN  VARCHAR2,
encrypted_string OUT VARCHAR2,
which IN PLS_INTEGER
DEFAULT TwoKeyMode,
iv_string IN VARCHAR2 DEFAULT NULL);
TBD
Overload 4 dbms_obfuscation_toolkit.des3Encrypt(
input_string IN VARCHAR2,
key_string   IN VARCHAR2,
which        IN PLS_INTEGER DEFAULT TwoKeyMode,
iv_string    IN VARCHAR2    DEFAULT NULL)
RETURN VARCHAR2;
TBD
 
DES3GETKEY
Triple DES

Overload 1
dbms_obfuscation_toolkit.des3GetKey(
which IN  PLS_INTEGER DEFAULT TwoKeyMode,
seed  IN  RAW,
key   OUT RAW);
TBD
Overload 2 dbms_obfuscation_toolkit.des3GetKey(
which IN PLS_INTEGER DEFAULT TwoKeyMode,
seed  IN RAW)
RETURN RAW;
TBD
Overload 3 dbms_obfuscation_toolkit.des3GetKey(
which       IN PLS_INTEGER DEFAULT TwoKeyMode,
seed_string IN VARCHAR2,
key OUT VARCHAR2);
TBD
Overload 4 dbms_obfuscation_toolkit.ES3GetKey(
which       IN PLS_INTEGER DEFAULT TwoKeyMode,
seed_string IN VARCHAR2)
RETURN VARCHAR2;
TBD
 
DESDECRYPT
DES Decryption

Overload 1
dbms_obfuscation_toolkit.desDecrypt(
input          IN  RAW,
key            IN  RAW,
decrypted_data OUT RAW);
TBD
Overload 2 dbms_obfuscation_toolkit.desDecrypt(
input IN RAW,
key   IN RAW)
RETURN RAW;
TBD
Overload 3 dbms_obfuscation_toolkit.desDecrypt(
input_string     IN  VARCHAR2,
key_string       IN  VARCHAR2,
decrypted_string OUT VARCHAR2);
TBD
Overload 4 dbms_obfuscation_toolkit.desDecrypt(
input_string IN VARCHAR2,
key_string   IN VARCHAR2)
RETURN VARCHAR2;
TBD
 
DESENCRYPT
DES Encryption"

Overload 1
dbms_obfuscation_toolkit.desEncrypt(
input          IN  RAW,
key            IN  RAW,
encrypted_data OUT RAW);
TBD
Overload 2 dbms_obfuscation_toolkit.desEncrypt(
input IN RAW,
key   IN RAW)
RETURN RAW;
TBD
Overload 3 dbms_obfuscation_toolkit.desEncrypt(
input_string     IN  VARCHAR2,
key_string       IN  VARCHAR2,
encrypted_string OUT VARCHAR2);
TBD
Overload 4 dbms_obfuscation_toolkit.desEncrypt(
input_string IN VARCHAR2,
key_string   IN VARCHAR2)
RETURN VARCHAR2;
TBD
 
DESGETKEY
Generates an encryption key

Overload 1
dbms_obfuscation_toolkit.desGetKey(
seed IN  RAW,
key  OUT RAW);
TBD
Overload 2 dbms_obfuscation_toolkit.desGetKey(seed IN RAW)
RETURN RAW;
TBD
Overload 3 dbms_obfuscation_toolkit.desGetKey(
seed_string IN  VARCHAR2,
key         OUT VARCHAR2);
TBD
Overload 4 dbms_obfuscation_toolkit.desGetKey(seed_string IN VARCHAR2)
RETURN VARCHAR2;
TBD
 
MD5
Generate MD5 hash

Overload 1
dbms_obfuscation_toolkit.MD5(
input    IN  RAW,
checksum OUT raw_checksum);
TBD
Overload 2 dbms_obfuscation_toolkit.MD5(input IN RAW)
RETURN raw_checksum;
SELECT dbms_obfuscation_toolkit.md5(utl_raw.cast_to_raw('zzyzx')) FROM dual
*
ERROR at line 1:
ORA-06553: PLS-307: too many declarations of 'MD5' match this call
Overload 3 dbms_obfuscation_toolkit.MD5(
input_string    IN  VARCHAR2,
checksum_string OUT varchar2_checksum);
TBD
Overload 4 dbms_obfuscation_toolkit.MD5(input_string IN VARCHAR2)
RETURN varchar2_checksum;
TBD

Related Topics
Built-in Functions
Built-in Packages
What's New In 12cR2
What's New In 18cR3

Morgan's Library Page Footer
This site is maintained by Dan Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2017 Daniel A. Morgan All Rights Reserved