Oracle9i Supplied PL/SQL Packages and Types Reference Release 1 (9.0.1) Part Number A8985202 

DBMS_OBFUSCATION_TOOLKIT , 2 of 5
The DESEncrypt procedure generates the encrypted form of the input data. An example of the DESEncrypt procedure appears at the end of this chapter.
The DES algorithm encrypts data in 64bit blocks using a 56bit key. The DES algorithm throws away 8 bits of the supplied key (the particular bits which are thrown away is beyond the scope of this documentation). However, developers using the algorithm must supply a 64bit key or the package will raise an error.
Table 301 and Table 302 list the parameters for the DESEncrypt syntax, their modes, types, and descriptions.
Parameter Name  Mode  Type  Description 

input 
IN 
RAW 
data to be encrypted 
key 
IN 
RAW 
encryption key 
encrypted_data 
OUT 
RAW 
encrypted data 
Parameter Name  Mode  Type  Description 

input_string 
IN 
VARCHAR2 
string to be encrypted 
key_string 
IN 
VARCHAR2 
encryption key string 
encrypted_string 
OUT 
VARCHAR2 
encrypted string 
If the input data or key given to the PL/SQL DESEncrypt procedure is empty, then the procedure raises the error ORA28231 "Invalid input to Obfuscation toolkit".
If the input data given to the DESEncrypt procedure is not a multiple of 8 bytes, the procedure raises the error ORA28232 "Invalid input size for Obfuscation toolkit".
If the user tries to double encrypt data using the DESEncrypt procedure, then the procedure raises the error ORA28233 "Double encryption not supported".
If the key length is missing or is less than 8 bytes, then the procedure raises the error ORA28234 "Key length too short." Note that if larger keys are used, extra bytes are ignored. So a 9byte key will not generate an exception.
The DESEncryption procedure has two restrictions. The first is that the DES key length for encryption is fixed at 56 bits; you cannot alter this key length.
The second is that you cannot execute multiple passes of encryption. That is, you cannot reencrypt previously encrypted data by calling the function twice.

Copyright © 19962001, Oracle Corporation. All Rights Reserved. 
