Oracle DBMS_OBFUSCATION_TOOLKIT_FFI
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 but I thought I'd finally get around to capturing information about it.
AUTHID DEFINER
Dependencies
DBMS_OBFUSCATION_LIB DBMS_OBFUSCATION_TOOLKIT  
Documented No
First Available 18.1.0.0
Security Model Owned by SYS with no privileges granted
Source {ORACLE_HOME}/rdbms/admin/prvtobtk.plb
Subprograms
 
DES3DECRYPT
Triple DES Decryption dbms_obfuscation_toolkit_ffi.des3decrypt(
nput  IN RAW,
key   IN RAW,
which IN BINARY_INTEGER,
iv    IN RAW)
RETURN RAW;
TBD
 
DES3ENCRYPT
Triple DES Encryption dbms_obfuscation_toolkit_ffi.des3encrypt(
nput  IN RAW,
key   IN RAW,
which IN BINARY_INTEGER,
iv    IN RAW)
RETURN RAW;
See DESENCRYPT Demo Below
 
DESDECRYPT
DES Decryption dbms_obfuscation_toolkit_ffi.desdecrypt(
input IN RAW,
key   IN RAW)
RETURN RAW;
TBD
 
DESENCRYPT
DES Encryption dbms_obfuscation_toolkit_ffi.desencrypt(
input IN RAW,
key   IN RAW)
RETURN RAW;
SQL> SELECT dbms_obfuscation_toolkit_ffi.desencrypt(utl_raw.cast_to_raw('3145670942985105'),
  2 dbms_obfuscation_toolkit_ffi.getkey(2,
  3 utl_raw.cast_to_raw('ThisIsMySeedThisIsYourSeedFromCaliforniaToTheNewYorkIsland') ||
  4 utl_raw.cast_to_raw('ThisIsMySeedThisIsYourSeedFromCaliforniaToTheNewYorkIsland')))
  5 AS EncKey
  6 FROM dual;

ENCKEY
---------------------------------
E5333D9A7EEADF5B47F4E95531FEA468
 
GETKEY
Generate Key

The seed must be at least 80 characters
dbms_obfuscation_toolkit_ffi.getkey(
algorithm IN BINARY_INTEGER,
seed      IN RAW)
RETURN RAW;
SQL> SELECT dbms_obfuscation_toolkit_ffi.getkey(2,
     utl_raw.cast_to_raw('ThisIsMySeedThisIsYourSeedFromCaliforniaToTheNewYorkIsland') ||
     utl_raw.cast_to_raw('ThisIsMySeedThisIsYourSeedFromCaliforniaToTheNewYorkIsland'))
  2  AS KeyVal
  3  FROM dual;

KEYVAL
-------------------------------------------------
07CF6919266BE47020A46B3635D424C1302E1F284C498ABD
 
MD5
Genrate MD5 hash dbms_obfuscation_toolkit_ffi.md5(input IN RAW) RETURN RAW;
SQL> SELECT dbms_obfuscation_toolkit_ffi.md5(utl_raw.cast_to_raw('N0Way1n'))
  2  FROM dual;

DBMS_OBFUSCATION_TOOLKIT_FFI.MD5(UTL_RAW.CAST_TO_RAW('N0WAY1N'))
-----------------------------------------------------------------
7722627A9D0069B578785BDBDA4FA219

Related Topics
Built-in Functions
Built-in Packages
DBMS_CRYPTO
DBMS_CRYPTO_FFI
DBMS_CRYPTO_INTERNAL
DBMS_CRYPTO_TOOLKIT
DBMS_CRYPTO_TOOLKIT_FFI
DBMS_CRYPTO_TOOLKIT_TYPES
DBMS_OBFUSCATION_TOOLKIT
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