ORA-28232 w/ DBMS_OBFUSCATION_TOOLKIT

I am attempting to use DBMS_OBFUSCATION_TOOLKIT.DESEncrypt on an Oracle 8.1.6.3 database. However it keeps throwing the 28232 error. However I am definitely using an 8 character password.
Does anybody know what the problem might be?
TIA, APC

Here is the my_encryption package code ...........
CREATE OR REPLACE PACKAGE BODY my_encryption IS
|| Local variable to hold the current encryption key.
ps_encryption_key RAW(32);
|| Local exception to hide Oracle -28231 Error Code.
INTERNAL_BAD_KEY exception;
PRAGMA EXCEPTION_INIT(INTERNAL_BAD_KEY, -28231);
|| Local exception to hide Oracle -28232 Error Code.
INTERNAL_BAD_DATA exception;
PRAGMA EXCEPTION_INIT(INTERNAL_BAD_DATA, -28232);
|| Local function to get the encryption key for a particular case.
FUNCTION get_case_encryption_key(pi_cas_id IN ELS_CASES.ID%TYPE) RETURN RAW IS
|| The key to be returned.
key RAW(16);
|| Cursor to return the case encyption key in encrypted format.
CURSOR c_case_key(b_cas_id ELS_CASES.ID%TYPE) IS
SELECT encryption_key
FROM els_cases
WHERE id = b_cas_id;
BEGIN
OPEN c_case_key(pi_cas_id);
FETCH c_case_key INTO key;
CLOSE c_case_key;
RETURN key;
EXCEPTION
WHEN NO_DATA_FOUND THEN
RAISE NO_CASE;
END;
|| Procedure to initialize package with the master key.
|| The master key will be held elsewhere from the database.
PROCEDURE set_master_key(pi_key IN RAW) IS
BEGIN
IF LENGTHB(pi_key) != 32 THEN
RAISE BAD_KEY;
END IF;
ps_encryption_key := pi_key;
END;
|| Procedure to initialize package with the master key.
|| Always returns 'Y'
|| The master key will be held elsewhere from the database.
FUNCTION set_master_key(pi_key IN RAW) RETURN VARCHAR2 IS
BEGIN
set_master_key(pi_key);
RETURN 'Y';
END;
|| Procedure to initialize package with the case encryption key.
PROCEDURE set_case_key(pi_master_key IN RAW,
pi_cas_id IN ELS_CASES.ID%TYPE) IS
BEGIN
ps_encryption_key := pi_master_key;
ps_encryption_key := decrypt(pi_data=>get_case_encryption_key(pi_cas_id));
END;
|| Function to initialize package with the case encryption key.
|| Always returns 'Y'
FUNCTION set_case_key(pi_master_key IN RAW,
pi_cas_id IN ELS_CASES.ID%TYPE) RETURN VARCHAR2 IS
BEGIN
set_case_key(pi_master_key,pi_cas_id);
RETURN 'Y';
END;
|| Function to encrypt data using the master key. Note the length of
|| pi_data, in bytes, must be at most 2000 bytes and be divisible by 8.
FUNCTION encrypt(pi_data IN RAW) RETURN RAW IS
BEGIN
RETURN dbms_obfuscation_toolkit.DES3Encrypt(input => pi_data,
key => ps_encryption_key);
EXCEPTION
WHEN INTERNAL_BAD_DATA THEN
RAISE BAD_DATA;
WHEN INTERNAL_BAD_KEY THEN
RAISE BAD_KEY;
END;
|| Function to encrypt a BLOB using the current encryption key.
FUNCTION encrypt(pi_blob IN BLOB) RETURN BLOB IS
|| Temporary blob variable to hold the encrypted contents.
result blob;
|| Variable to hold the length of the blob.
blob_length PLS_INTEGER := dbms_lob.getlength(pi_blob);
|| The Oracle encryption routines can only encrypt data whose length is <=2000.
max_chunk_length PLS_INTEGER := 2000;
|| Variable to hold the length of the current chunk that is being encrypted.
chunk_length PLS_INTEGER;
|| Variable to remember which how much of the input blob has been encrypted.
pointer PLS_INTEGER := 1;
|| Variable to hold the next bit of data to be encrypted.
chunk RAW(2000);
|| Variable to hold a pad byte used to pad the last chunk.
pad RAW(1) := utl_raw.substr(utl_raw.cast_to_raw('0'),1,1);
BEGIN
|| Create the temporary blob using the database memory buffer.
dbms_lob.createtemporary(result, TRUE, dbms_lob.call);
|| Loop through the input blob
WHILE (pointer <= blob_length) LOOP
|| Grab at most 2000 bytes from the input blob.
chunk_length := LEAST(max_chunk_length,blob_length-pointer+1);
chunk := dbms_lob.substr(pi_blob,chunk_length,pointer);
|| Pad any chunk (ie the last) so its length is divisible by 8 (another Oracle limitation on encryption)!.
WHILE mod(chunk_length,8) !=0 LOOP
chunk := utl_raw.concat(chunk,pad);
chunk_length := chunk_length+1;
END LOOP;
|| Encrypt the chunk and write it to the end of the temporary blob.
dbms_lob.writeappend(result,
chunk_length,
encrypt(pi_data => chunk)
|| Advance the pointer by the length of the last chunk.
pointer := pointer + chunk_length;
END LOOP;
|| All Done!
RETURN result;
END;
|| Function to decrypt data using the master key. Note the length of
|| pi_data, in bytes, must be at most 2000 bytes and be divisible by 8.
FUNCTION decrypt(pi_data IN RAW) RETURN RAW IS
BEGIN
RETURN dbms_obfuscation_toolkit.DES3Decrypt(input => pi_data,
key => ps_encryption_key);
EXCEPTION
WHEN INTERNAL_BAD_DATA THEN
RAISE BAD_DATA;
WHEN INTERNAL_BAD_KEY THEN
RAISE BAD_KEY;
END;
|| Function to decrypt a BLOB using the current encryption key.
FUNCTION decrypt(pi_blob IN BLOB,
pi_size IN PLS_INTEGER) RETURN BLOB IS
|| Temporary blob variable to hold the encrypted contents.
result BLOB;
|| Variable to hold the length of the blob.
blob_length PLS_INTEGER := dbms_lob.getlength(pi_blob);
|| The Oracle encryption routines can only encrypt data whose length is <=2000.
max_chunk_length PLS_INTEGER := 2000;
|| Variable to hold the length of the current chunk that is being encrypted.
chunk_length PLS_INTEGER;
|| Variable to remember which how much of the input blob has been encrypted.
pointer PLS_INTEGER := 1;
BEGIN
|| Create the temporary blob using the database memory buffer.
dbms_lob.createtemporary(result, TRUE, dbms_lob.call);
|| Loop through the input blob
WHILE (pointer <= blob_length) LOOP
|| Grab at most 2000 bytes from the input blob.
chunk_length := LEAST(max_chunk_length,blob_length-pointer+1);
|| Decrypt the chunk and write it to the end of the temporary blob.
dbms_lob.writeappend(result,
chunk_length,
decrypt(pi_data => dbms_lob.substr(pi_blob,
chunk_length,
pointer
|| Advance the pointer by the length of the last chunk.
pointer := pointer + chunk_length;
END LOOP;
|| Remove the padding bytes that were added when the data was encrypted.
dbms_lob.trim(result,pi_size);
|| All Done!
RETURN result;
END;
|| Procedure to clear session state of stored keys.
PROCEDURE CLEAR IS
BEGIN
ps_encryption_key:=null;
END;
END;
and here is the PL/sql I run before running the sql stmt
DECLARE
mkey LONG RAW;
BEGIN
mkey := UTL_RAW.CAST_TO_RAW ('&&key');
my_encryption.set_master_key(mkey);
my_encryption.set_case_key(mkey,&&case_id);
END;
mkey is a 16 digit key .
and the encrypted_contents I'm trying to decrypt is a BLOB.
select my_encryption.decrypt(encrypted_contents,file_size),mime_type
from my_drafts where id = &&draft_id;
I hope this makes sense .
Ragini

Similar Messages

  • ORA-28232: invalid input length for obfuscation toolkit

    hi,
    i am facing this error when i enterd more then 8 charecter in the input string.
    ORA-28232: invalid input length for obfuscation toolkit
    why i cant user more then 8 charecter for password.?

    Rajnish Chauhan wrote:
    hi,
    i am facing this error when i enterd more then 8 charecter in the input string.
    ORA-28232: invalid input length for obfuscation toolkit
    why i cant user more then 8 charecter for password.?
    28232, 0000, "invalid input length for obfuscation toolkit"
    // *Cause:  Length of data submitted for encryption or decryption is not a
    //          multiple of 8 bytes.
    // *Action: Make sure that the length of the data to be encrypted or decrypted
    //          is a multiple of 8 bytes.since you did not share with us exactly what you did, we can say exactly what you did wrong.
    How do I ask a question on the forums?
    SQL and PL/SQL FAQ

  • Error while using 3DES algorithm

    Hi All,
    i am trying to decrypt and encrypt the data using 3DES algorithm.i am facing following problem.find below what exaclty i have done:
    SQL> variable x varchar2(100);
    SQL> exec :x := 'how r u Anwar';
    PL/SQL procedure successfully completed.
    X
    how r u Anwar
    SQL> create or replace procedure crypt1( p_str in out varchar2 )
    2 as
    3 l_data varchar2(255);
    4 begin
    5 l_data := rpad( p_str, (trunc(length(p_str)/8)+1)*8, chr(0) );
    6 dbms_obfuscation_toolkit.DESEncrypt
    7 ( input_string => l_data,
    8 key_string => 'MagicKey',
    9 encrypted_string=> p_str );
    10 end;
    11 /
    Procedure created.
    SQL> create or replace procedure decrypt1( p_str in out varchar2 )
    2 as
    3 l_data varchar2(255);
    4 begin
    5 dbms_obfuscation_toolkit.DESDecrypt
    6 ( input_string => p_str,
    7 key_string => 'MagicKey',
    8 decrypted_string=> l_data );
    9
    10 p_str := rtrim( l_data, chr(0) );
    11 end;
    12 /
    Procedure created.
    SQL> set autoprint on;
    SQL> exec crypt1( :x );
    PL/SQL procedure successfully completed.
    X
    5??V????? ??
    SQL> exec decrypt1( :x );
    BEGIN decrypt1( :x ); END;
    ERROR at line 1:
    ORA-28232: invalid input length for obfuscation toolkit
    ORA-06512: at "SYS.DBMS_OBFUSCATION_TOOLKIT_FFI", line 0
    ORA-06512: at "SYS.DBMS_OBFUSCATION_TOOLKIT", line 153
    ORA-06512: at "UJAPAN.DECRYPT1", line 5
    ORA-06512: at line 1
    X
    5??V????? ??
    Any idea or thought would be appreciable.
    Thanks n advance
    Anwar

    From the top of my head (without checking the docs) I think that the string to be obfuscated must have a length of a multitude of 8 bytes. You might need some padding to get it to the right length.
    cu
    Andreas

  • Error in B2B Console

    Hi gurus,
    I am gettig the following error in b2b console while running one of our outbound agreements.This is a strange error and i am seeing it for the first time.
    StackTrace:
    Error -: AIP-50014: General Error: Error -: AIP-13118: Business Logic Internal Error: java.sql.SQLException: ORA-28232: invalid input length for obfuscation toolkit
    ORA-06512: at "SYS.DBMS_OBFUSCATION_TOOLKIT_FFI", line 84
    ORA-06512: at "SYS.DBMS_OBFUSCATION_TOOLKIT", line 233
    ORA-06512: at line 1
         at oracle.tip.adapter.b2b.engine.Engine.processOutgoingMessage(Engine.java:1194)
         at oracle.tip.adapter.b2b.data.MsgListener.onMessage(MsgListener.java:836)
         at oracle.tip.adapter.b2b.data.MsgListener.run(MsgListener.java:402)
         at java.lang.Thread.run(Thread.java:534)
    Caused by: Error -: AIP-13118: Business Logic Internal Error: java.sql.SQLException: ORA-28232: invalid input length for obfuscation toolkit
    ORA-06512: at "SYS.DBMS_OBFUSCATION_TOOLKIT_FFI", line 84
    ORA-06512: at "SYS.DBMS_OBFUSCATION_TOOLKIT", line 233
    ORA-06512: at line 1
         at oracle.tip.common.security.Secret.decode(Secret.java:134)
         at oracle.tip.adapter.b2b.tpa.RepoDataAccessor.addTransportInfo(RepoDataAccessor.java:994)
         at oracle.tip.adapter.b2b.tpa.RepoDataAccessor.addFROMPartyInfo(RepoDataAccessor.java:838)
         at oracle.tip.adapter.b2b.tpa.RepoDataAccessor.getAgreementDetails(RepoDataAccessor.java:412)
         at oracle.tip.adapter.b2b.tpa.TPAProcessor.processTPA(TPAProcessor.java:742)
         at oracle.tip.adapter.b2b.tpa.TPAProcessor.processOutgoingTPA(TPAProcessor.java:223)
         at oracle.tip.adapter.b2b.engine.Engine.processOutgoingMessage(Engine.java:1107)
         ... 3 more
    Caused by: java.sql.SQLException: ORA-28232: invalid input length for obfuscation toolkit
    ORA-06512: at "SYS.DBMS_OBFUSCATION_TOOLKIT_FFI", line 84
    ORA-06512: at "SYS.DBMS_OBFUSCATION_TOOLKIT", line 233
    ORA-06512: at line 1
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:137)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:315)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:281)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:638)
         at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:183)
         at oracle.jdbc.driver.T4CCallableStatement.execute_for_rows(T4CCallableStatement.java:872)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1160)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3000)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3092)
         at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4285)
         at oracle.tip.common.security.Service.decode(Service.java:119)
         at oracle.tip.common.security.Secret.decode(Secret.java:130)
         ... 9 more
    Any ideas?
    Oracle B2B Version- 10.1.2.3
    Regards
    Ayush

    Thanks Anuj. This happened in one of our Test Instances, after purging the repo and reimporting the agreements its working fine. If it comes up again or if i see it in Prod instance i will open an SR with Oracle.
    Thanks
    Ayush

  • Encrypting and Decrypting Data(Its Very Urgent, Please Help.)

    Hi,
    Can anyone tell me some idea in the below mentioned details.
    Iam creating a Function for Encrypting and Decrypting Data Values using
    DBMS_OBFUSCATION_TOOLKIT with UTL_RAW.CAST_TO_RAW by using
    Key Value as normal.
    But the problem, is it possible to have the key value more than 8.
    Its showing me error when i give the key value less than 8 or more than 8.
    Can u tell me why it happens, is that the limit of the key value or is any other way to do that.
    Its Very Urgent, Please Help.
    Thanks,
    Murali.V

    Is this what you're looking for?
    Usage Notes
    If the input data or key given to the DES3DECRYPT procedure is empty, then the procedure raises the error ORA-28231 "Invalid input to Obfuscation toolkit."
    If the input data given to the DES3DECRYPT procedure is not a multiple of 8 bytes, the procedure raises the error ORA-28232 "Invalid input size for Obfuscation toolkit." ORA-28233 is NOT applicable for the DES3DECRYPT function.
    If the key length is missing or is less than 8 bytes, then the procedure raises the error ORA-28234 "Key length too short." Note that if larger keys are used, extra bytes are ignored. So a 9-byte key will not generate an exception.
    C.

  • DESEncrypt Function don't work with any charakter

    Hi!
    I wrote a function to encrypt data using the DESEncrypt function:
    Create or replace function verschluessel (input_str varchar2,key_string varchar2) return RAW as
    input_string varchar2 (4000);
    encrypted_string varchar2(4000);
    raw_input RAW(4000);
    raw_key RAW(128) := UTL_RAW.CAST_TO_RAW(key_string);
    encrypted_raw RAW(4000);
    test smallint := 8 - mod(length(input_str),8);
    ergaenz varchar2(7);
    begin
    loop
    if test = 0 OR test = 8 then
    exit;
    end if;
    ergaenz := ergaenz || ' ';
    test := test - 1;
    end loop;
    input_string := input_str || ergaenz;
    raw_input := UTL_RAW.CAST_TO_RAW(input_string);
    dbms_obfuscation_toolkit.DESEncrypt(input => raw_input,key => raw_key,
    encrypted_data => encrypted_raw);
    return encrypted_raw;
    end verschluessel;
    The problem is, if the input_string contains german umlaute or special french characters, the error message ORA-28232 "Invalid input size for Obfuscation toolkit" appears.
    How can I solve that ?
    Thanx Andri.

    Resolving issues with Touch ID
    Make sure that you're using the latest version of iOS.
    Make sure that your fingers and the Home button are clean and dry.*
    Note: Cover the Home button completely. Don't tap too quickly, don't press down hard, and don't move your finger while Touch ID is scanning. Make sure that your finger touches the metal ring around the Home button.
    If you're using a protective case or screen protector, it must leave the Home button and the surrounding ring completely unobscured. If it doesn't, remove the case or screen protector and try again.
    Tap Settings > Touch ID & Passcode and verify that:
    iPhone Unlock or iTunes & App Store is on.
    You enrolled one or more fingerprints.
    Try enrolling a different finger.
    If you can't enroll any of your fingers, take your iPhone 5s to an Apple Retail Store, Apple Authorized Service Provider, or contact AppleCare for further assistance.
    * Moisture, lotions, sweat, oils, cuts, or dry skin might affect fingerprint recognition. Certain activities can also temporarily affect fingerprint recognition, including exercising, showering, swimming, cooking, or other conditions or changes that affect your fingerprint.

  • Regarding encryption on oracle 9i

    Hi,
    I am unable to encrypt the value from the below block.
    DECLARE
    input_string VARCHAR2(100) := 'date=' || to_char(sysdate,'YYYYMMDD') ||'&'||'userid=' ||'ppacobqi^^^^ldbs`lrm';
    raw_input RAW(128) := UTL_RAW.CAST_TO_RAW(input_string);
    key_string VARCHAR2(100) := '8uNDf!sVC';
    raw_key RAW(128) := UTL_RAW.CAST_TO_RAW(key_string);
    encrypted_raw RAW(2048);
    encrypted_string VARCHAR2(2048);
    BEGIN
    dbms_obfuscation_toolkit.DESEncrypt(input => raw_input,
    key => raw_key, encrypted_data => encrypted_raw );
    dbms_output.put_line('> encrypted hex value : ' || rawtohex(encrypted_raw));
    END;
    am getting the below error.can anybody please help me out
    ORA-28232: invalid input length for obfuscation toolkit
    thanks in advance

    Hi,
    See: http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:791026226790#5982134701147
    and/or:http://asktom.oracle.com/pls/ask/search?p_string=ORA28232+

  • Runtime repository error

    Hi,
    I have new database. In which i have to update the runtime repository parameters. Actually this database is the clone of existing database.
    In the table WB_RT_STORE_PARAMETERS, i have updated the parameter value and parameter name for new database.
    Parameter Name: Parameter Value
    Schema ID_OWN_DM
    host gsunk886h.stex.com
    Port 1521
    Password password-1
    In the old database, the password is an encrypted one and it will be like something like ??$$||&?
    But now, actual password is displaying. So when i try to deploy the mapping i am getting the following error.
    Create Failed Create RPE-01003: An infrastructure condition prevented the request from completing.
    - ORA-28232: invalid input length for obfuscation toolkit
    ORA-06512: at "SYS.DBMS_OBFUSCATION_TOOLKIT_FFI", line 40
    ORA-06512: at "SYS.DBMS_OBFUSCATION_TOOLKIT", line 153
    ORA-06512: at "ID_OWN_PSRT.WB_RT_SERVICE_CONTROL", line 254
    Kindly help,
    Sasi

    Hi,
    I have new database. In which i have to update the runtime repository parameters. Actually this database is the clone of existing database.
    In the table WB_RT_STORE_PARAMETERS, i have updated the parameter value and parameter name for new database.
    Parameter Name: Parameter Value
    Schema ID_OWN_DM
    host gsunk886h.stex.com
    Port 1521
    Password password-1
    In the old database, the password is an encrypted one and it will be like something like ??$$||&?
    But now, actual password is displaying. So when i try to deploy the mapping i am getting the following error.
    Create Failed Create RPE-01003: An infrastructure condition prevented the request from completing.
    - ORA-28232: invalid input length for obfuscation toolkit
    ORA-06512: at "SYS.DBMS_OBFUSCATION_TOOLKIT_FFI", line 40
    ORA-06512: at "SYS.DBMS_OBFUSCATION_TOOLKIT", line 153
    ORA-06512: at "ID_OWN_PSRT.WB_RT_SERVICE_CONTROL", line 254
    Kindly help,
    Sasi

  • OEM 10g grid.... Please help..

    Hi all
    Please can someone help... Im new at this and Im having afew issues..
    Im running Oracle 10g grid on AIX box . The install went well and Im able to connect to all targets....
    1) The repositry database startsup without any error messages but in OEM software shows the database is in a Mertric Collection status.. unknown
    OEM shows that the Instance is down but its not...
    SQL> select * from V$instance;
    INSTANCE_NUMBER INSTANCE_NAME
    HOST_NAME
    VERSION STARTUP_T STATUS PAR THREAD# ARCHIVE LOG_SWITCH_
    LOGINS SHU DATABASE_STATUS INSTANCE_ROLE ACTIVE_ST
    1 oem0a
    BigMac
    10.1.0.4.0 09-SEP-08 OPEN NO 1 STOPPED
    ALLOWED NO ACTIVE PRIMARY_INSTANCE NORMAL
    Also the Agent connection is down..
    Agent Connection to Instance
    Status Failed
    Details Failed to connect to database instance: ORA-12505: TNS:listener does not currently know of SID given in connect descriptor (DBD ERROR: OCIServerAttach).
    AGENT STATUS
    [email protected]> emctl status agent
    Oracle Enterprise Manager 10g Release 10.2.0.1.0.
    Copyright (c) 1996, 2005 Oracle Corporation. All rights reserved.
    Agent Version : 10.2.0.1.0
    OMS Version : 10.2.0.1.0
    Protocol Version : 10.2.0.0.0
    Agent Home : /apps/oracle/OracleHomeOEM/agent10g
    Agent binaries : /apps/oracle/OracleHomeOEM/agent10g
    Agent Process ID : 397392
    Parent Process ID : 74206
    Agent URL : https://bigmac.dstio.com:1830/emd/main/
    Repository URL : https://bigmac.dstio.com:1159/em/upload
    Started at : 2008-09-06 06:28:29
    Started by user : oracle
    Last Reload : 2008-09-06 21:29:15
    Last successful upload : 2008-09-09 10:13:56
    Total Megabytes of XML files uploaded so far : 28.47
    Number of XML files pending upload : 0
    Size of XML files pending upload(MB) : 0.00
    Available disk space on upload filesystem : 11.78%
    Last successful heartbeat to OMS : 2008-09-09 10:16:05
    Agent is Running and Ready
    [email protected]>
    2) When I try the following commands I get the following error message
         emctl stop dbconsole
         emctl start dbconsole
         emctl status dbconsole
    [email protected]> emctl status dbconsole
    OC4J Configuration issue. /apps/oracle/OracleHomeOEM/oms10g/oc4j/j2ee/OC4J_DBConsole not found.
    When I try to recreate the repository I get the following message...
    3) emca -config dbcontrol db -repos create
    Incorrect usage:
    ( ive tried the binaries in both locations ... /apps/oracle/OracleHomeOEM/oms10g/bin and /apps/oracle/OracleHomeOEM/agent10g/bin) still no luck
    oracle.sysman.emcp.EMConfigAssistant [options] [list of parameters]
    Options:
    -a :configure for an ASM database
    -b :configure for automatic backup
    -c :configure a cluster database
    -e <node> :remove a node from the cluster
    -f <file> :specify the file name that contains parameter values
    -h :help
    -m :configure EM for a central agent
    -n <node> :add a new node to the cluster
    -r :skip creation of repository schema
    -s :silent mode (no user prompts
    -x <db> :deletion of a SID or DB
    -RMI_PORT <port> :specify the RMI port for DB Control
    -JMS_PORT <port> :specify the JMS port for DB Control
    -AGENT_PORT <port> :specify the EM agent port
    -DBCONSOLE_HTTP_PORT <port> :specify the DB Control HTTP port
    The script will prompt for any required data that is not specified in a configuration file. The script always prompts for all required passwords. If you use a configuration file, the file may contain any of the following specifications, as shown, with the specified values correctly filled in:
    4) When setting the Preferred Credentials on the host using OEM I get the following error message.:
    SQL Error: ORA-28232: invalid input length for obfuscation toolkit ORA-06512: at "SYS.DBMS_OBFUSCATION_TOOLKIT_FFI", line 84 ORA-06512: at "SYS.DBMS_OBFUSCATION_TOOLKIT", line 233 ORA-06512: at "SYSMAN.DECRYPT", line 9 when I try apply the Preferred Credentials on the Instance I get the same kindof message...
    ORA-28232: invalid input length for obfuscation toolkit ORA-06512: at "SYSMAN.MGMT_CREDENTIAL", line 1284 ORA-06512: at "SYSMAN.MGMT_CREDENTIAL", line 1333 ORA-06512: at line 1
    5) In the emoms.log In get the following error message,,,
    2008-09-05 07:14:50,001 [XMLLoader0 30000000298.xml] ERROR eml.XMLLoader java.? - Failed to load 30000000298.xml even after 2 attempts; moving to errors direc
    tory. Error:
    java.sql.SQLException: ORA-14400: inserted partition key does not map to any partition
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java(Compiled Code))
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java(Compiled Code))
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java(Inlined Compiled Code))
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java(Compiled Code))
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java(Compiled Code))
    at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java(Compiled Code))
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java(Compiled Code))
    at oracle.jdbc.driver.OraclePreparedStatement.sendBatch(OraclePreparedStatement.java(Compiled Code))
    at oracle.sysman.util.jdbc.PreparedStatementWrapper.sendBatch(PreparedStatementWrapper.java(Compiled Code))
    at oracle.sysman.emdrep.dbjava.loader.XMLLoaderContext.flushAllStatements(XMLLoaderContext.java(Compiled Code))
    at oracle.sysman.emdrep.dbjava.loader.XMLDocumentSplitter.endElement(XMLDocumentSplitter.java(Compiled Code))
    at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java(Compiled Code))
    at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java(Compiled Code))
    at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java(Compiled Code))
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java(Compiled Code))
    at oracle.sysman.emdrep.dbjava.loader.XMLDocumentSplitter.split(XMLDocumentSplitter.java(Compiled Code))
    at oracle.sysman.emdrep.dbjava.loader.XMLLoaderContext.loadFromStream(XMLLoaderContext.java(Compiled Code))
    at oracle.sysman.emdrep.dbjava.loader.XMLLoader.LoadFile(XMLLoader.java(Compiled Code))
    at oracle.sysman.emdrep.dbjava.loader.XMLLoader.LoadFiles(XMLLoader.java(Compiled Code))
    at oracle.sysman.emdrep.dbjava.loader.XMLLoader.run(XMLLoader.java(Compiled Code))
    at java.lang.Thread.run(Thread.java:568)
    2008-09-05 07:16:53,415 [XMLLoader0 90000000233.xml] WARN eml.XMLLoader java.? - Marking the file for retry : 90000000233.xml after receiving exceptionjava.s
    ql.SQLException: ORA-14400: inserted partition key does not map to any partition
    2008-09-05 07:16:58,496 [XMLLoader0 90000000233.xml] ERROR eml.XMLLoader java.? - Failed to load 90000000233.xml even after 2 attempts; moving to errors direc
    tory. Error:
    java.sql.SQLException: ORA-14400: inserted partition key does not map to any partition
    Cheers

    Your first issue isn't necessarily a repsitory issue:
    1. Is your target configured?
    2. When you type "lsnrctl services" on the target server, does it return your target? If not, you need to resolve that issue first before it can be monitored via GRID

  • How to encrypt characters with multilingual?

    Hi,
    I used DBMS_OBFUSCATION_TOOLKIT.DESENCRYPT to encrypt characters without problem in plsql. However, when I attempted to encrypt characters containing Chinese characters (combinations of ABC's and Chinese characters), somehow it will give me the following errors:
    ORA-28232: invalid input length for obfuscation toolkit
    ORA-06512: at "SYS.DBMS_OBFUSCATION_TOOLKIT_FFI", line 21
    ORA-06512: at "SYS.DBMS_OBFUSCATION_TOOLKIT", line 99
    Please advice if it is possible to encrypt multilingual characters and if so, how, if it is different from the normal encryption ways. My database is 10g with UTF8 and the mentioned data is retrieved from database.
    Thank you in advance.
    Regards,
    wongly

    Hi,
    This is because the input data to DESENCRYPT must be a multiple of 8 bytes. If the input is chinese characters then 8 characters will be longer than 8 bytes. You must use lengthb and substrb functions to ensure that the input is exactly a multiple of 8 bytes.

  • Regarding small help

    Hi,
    I have a requirment is basically to piece together a URL string in a message and encode it in the following way.
    You would have a user authentication string that is made up of key/value pairs, for example:
    “date=2007-05-27&userid=ID12345” (string needs to be UTF8 encoded)
    To encode the string these are the steps they want us to follow and we will need to use a shared key: 8uNDf!sVC
    1.     Generate hex MD5 hash of the shared key concatenated with the user authentication string (should = 32 characthers)
    2.     Hex encode user authentication string
    3.     Concatenate result of step 1 with step 2
    Here’s the pseudo code for this:
    userStr = “date=YYYYMMDD&userid=123456”
    sharedKey = “8uNDf!sVC”
    encUser = md5(sharedKey + userStr) + hex(userStr)
    •     Note the “userid” value is the Encrypted Keycode we will be receiving in this import
    below are the two fields to import the data into a table
    a.email
    b.productkeycodeenc
    can you please anybody help me out.
    Thanks in advance

    Hi, I need help to encyrpt the data coming in a table. I have a table like this
    encryptionbatch
    =========
    contains two columns email,list_productkeycodeenc
    email|list_productkeycodeenc
    [email protected]|ppc'dpcb^^aem_qw
    [email protected]|ppc'__cb^^aeptmn
    [email protected]|ppc'''cb^^aenlht
    So based on that i need to encrypt the list_productkeycodeenc and insert into another table like this.
    /* Formatted on 2009/08/20 12:15 (Formatter Plus v4.8.8) */
    DECLARE
    CURSOR stagingtablerecords
    IS
    SELECT *
    FROM encryptionbatch;
    r stagingtablerecords%ROWTYPE;
    u users%ROWTYPE;
    input_string VARCHAR2 (128);
    raw_input RAW (128);
    key_string VARCHAR2 (16) := '8uNDf!sVC';
    raw_key RAW (128) := UTL_RAW.cast_to_raw (key_string);
    encrypted_raw RAW (2048);
    encrypted_string VARCHAR2 (2048);
    Procedure AccountInsert
    PROCEDURE accountinsert (UID IN users.ID%TYPE, keycodevar IN VARCHAR2)
    IS
    BEGIN
    -- Insert a user record
    INSERT INTO encryptiondata
    (userid, list_productkeycodeenc
    VALUES (UID, keycodevar
    END accountinsert;
    Begin main program block
    BEGIN
    FOR r IN stagingtablerecords
    LOOP
    BEGIN
    SELECT *
    INTO u
    FROM users
    WHERE email = r.email;
    input_string :=
    'date='
    || TO_CHAR (SYSDATE, 'YYYYMMDD')
    || '&'
    || 'userid='
    || r.list_productkeycodeenc;
    raw_input := UTL_RAW.cast_to_raw (input_string);
    BEGIN
    DBMS_OBFUSCATION_TOOLKIT.desencrypt
    (input => raw_input,
    KEY => raw_key,
    encrypted_data => encrypted_raw
    DBMS_OUTPUT.put_line ( '> encrypted hex value : '
    || RAWTOHEX (encrypted_raw)
    EXCEPTION
    WHEN OTHERS
    THEN
    DBMS_OUTPUT.put_line (SQLERRM);
    END;
    accountinsert (u.ID, RAWTOHEX (encrypted_raw));
    EXCEPTION
    WHEN NO_DATA_FOUND
    THEN
    DBMS_OUTPUT.put_line (SQLERRM);;
    WHEN OTHERS
    THEN
    DBMS_OUTPUT.put_line (SQLERRM);
    END;
    END LOOP;
    COMMIT;
    END;
    exit;
    I tried to run this block but am failed due to the error
    ORA-28232: invalid input length for obfuscation toolkit
    can you please anybody help me out on this. client using oracle 9i version.
    thanks in advance

  • Obfuscation examples/help

    Hi,
    I am looking for "real life" examples using the dbms_obfuscation_toolkit. We are trying to encrypt/decrypt social security numbers stored in our person information table. Any and all help would be greatly appreciated!

    Cool article. However, something to note:
    If your input message is not a multiple of 8 bytes, you will get this weird error which doesn't really tell you much:
    ERROR at line 1:
    ORA-28232: invalid input length for obfuscation toolkit
    ORA-06512: at "SYS.DBMS_OBFUSCATION_TOOLKIT_FFI", line 21
    ORA-06512: at "SYS.DBMS_OBFUSCATION_TOOLKIT", line 115
    ORA-06512: at line 7
    So something to watch out for.

  • Oracle8i and Oas 4081 - PLSQL TOOLKIT - Urgent Please help.

    Hi ,
    I installed Oracle 8i and Oas4081 on different ORACLE_HOME on the Linux 6.1 . When I tried to install the PLSQL toolkit it giving me an Oracle Database error 63744.
    But I am enabled the sql_trace and I found OAS is successfully connecting to Oralce8i database, but it failing for some reason.
    Do we need to do anything special on Oracle 8i side to install the PLSQL toolkit ..??
    .Please help ...
    Thanks in advance ..
    kkumar

    Is this what you're looking for?
    Usage Notes
    If the input data or key given to the DES3DECRYPT procedure is empty, then the procedure raises the error ORA-28231 "Invalid input to Obfuscation toolkit."
    If the input data given to the DES3DECRYPT procedure is not a multiple of 8 bytes, the procedure raises the error ORA-28232 "Invalid input size for Obfuscation toolkit." ORA-28233 is NOT applicable for the DES3DECRYPT function.
    If the key length is missing or is less than 8 bytes, then the procedure raises the error ORA-28234 "Key length too short." Note that if larger keys are used, extra bytes are ignored. So a 9-byte key will not generate an exception.
    C.

  • User Is not added to the user table

    I have an application that a user can self-register. It works at my company but somehow does not work on APEX.ORACLE.COM. Can someone look into it, please.
    Workspace: RGWORK
    Application:      21405 - Online Certification Application Prototype
    User: TESTER
    Password; Test123
    You click on the New User Profile Button. You select user name, password, and email address. It then ask you to sign on but then gives a not found error. You query the OCA_USER table and no rows are found.
    Can someone help?
    Robert
    My Blog: http://apexjscss.blogspot.com

    Hi,
    Seems to be a problem with your get_hash function.
    I get the error: ORA-28232: invalid input length for obfuscation toolkit
    If you look at the documentation for the package that you are using, you will notice:
    If the input data given to the DESDECRYPT function is not a multiple of 8 bytes, Oracle raises ORA error 28232 "Invalid input size for Obfuscation toolkit."

  • Help decrypting data

    Hi. I am trying to decrypt some data in java (NetBeans) which I had encrypted using jni and c to call java classes. When I run my java application, I get the following error:
    javax.crypto.BadPaddingException: Given final block not properly padded
    at com.sun.crypto.provider.SunJCE_h.b(DashoA12275)
    at com.sun.crypto.provider.SunJCE_h.b(DashoA12275)
    at com.sun.crypto.provider.AESCipher.engineDoFinal(DashoA12275)
    at javax.crypto.Cipher.doFinal(DashoA12275)
    I read the key which was generated by the c program using the dll. I am storing the key from jbyte * which gets the elements of jbyteArray. Do I need to convert this to byte or anything else so that I can use the same key in java to decrypt the same file. If you know the solution, please give some advice and perhaps some sample code. Thanks.

    Is this what you're looking for?
    Usage Notes
    If the input data or key given to the DES3DECRYPT procedure is empty, then the procedure raises the error ORA-28231 "Invalid input to Obfuscation toolkit."
    If the input data given to the DES3DECRYPT procedure is not a multiple of 8 bytes, the procedure raises the error ORA-28232 "Invalid input size for Obfuscation toolkit." ORA-28233 is NOT applicable for the DES3DECRYPT function.
    If the key length is missing or is less than 8 bytes, then the procedure raises the error ORA-28234 "Key length too short." Note that if larger keys are used, extra bytes are ignored. So a 9-byte key will not generate an exception.
    C.

Maybe you are looking for

  • Multiple subforms, only 1 of which will load when the PDF is opened.

    I am new to LIvecycle Designer, and have had no problems so far that I could not resolve via Google or trial and error.  Now I have an issue for which I cannot find an answer. I have created a fillable form, 2 pages, that will handle input of various

  • HR Extraction Info Objects

    Hello Guys, Presently i am working on Appraisal Infoset. i need some information regarding recognising some objects. please let me know what object are used in Businnes Content. 1 Performance Review Date 2 Next Performance Review Date 3 HRP Retention

  • Host command in report

    i want to use host command in report but error happened any thing instead of host

  • Switching from status to lccs, how easy is it?

    Hi there, I was just wondering if anyone here had, like me created an application using stratus and then decided to switch to lccs? How easy is it? Can you just change your connection endpoint and skipp all the rooms etc? or do you basically have to

  • Why is Compressor freezing when compressing?

    Hi, I would really appreciate help with this problem.  Compressor has recently started freezing / getting stuck when compressing.  This happened a couple of years ago and was resolved by using Compressor Repair 1.1.3.  I've tried the Repair programme