Using 'dbms_obfuscation_toolkit.md5' in my insert statment itself

Hi all,
I am trying to use 'dbms_obfuscation_toolkit.md5' in my insert statment itself as : insert into TEST_USERS values('username', dbms_obfuscation_toolkit.md5('password'));
But i get this : ORA-06553: PLS-307: too many declarations of 'MD5' match
Can you please help me on how can i insert a string (not raw) as MD5 hash to a table???
The password column i have is 'varchar(20)'. I dont mind changing it to something else. I am also struggling to find this package definition/help, to check what db type this function returns :-)
Thanks for the help.

Hello,
Try posting this to the General Database Discussions forum.
This forum is for SQLJ & JDBC.

Similar Messages

  • Adf - decrypt the value from dbms_obfuscation_toolkit.md5

    Currently we store a string value in the DB using dbms_obfuscation_toolkit.md5(input_string=>'124').
    How do I decrypt this value back so that I can display in the adf application please?

    btw, md5 is secure hash algorithm so you can't decrypt value.
    Dario

  • How can i  print reports to different printer by use Trigger on table after insert

    Hello,
    Please can any one tell me how can i print (any message) to different printer (network & local printer) by use Trigger on table after insert.
    regards,
    Linda.

    What you want to do cannot be done with PL/SQL, which does have any print utilities. However you could write something using Java Stored Procedures.
    Of course the "different printer" bit will have to be data driven as triggers are not interactive.
    rgds, APC

  • My iphon 5 said "only compatible sim cards from a supported carrier may be used to activate iphone. please insert the sim card that came with ur phone or visit a supported carrier's store to receive a replacement sim card" what do i do???

    my iphon 5 said "only compatible sim cards from a supported carrier may be used to activate iphone. please insert the sim card that came with ur phone or visit a supported carrier's store to receive a replacement sim card" what do i do??? i leave in diferent country now!!!???(((

    in many countries to make phones seem less expensive
    carriers pay most of the phones price for the customer
    but this come at the cost of the phone only being able to work
    with the carrier this is called a sim lock
    the only people who can remove a sim lock is the carrier which
    the phone is sim locked to they been doing it like that for at least 20 years

  • Need help in insert statment query

    Hi,
    I have a table T1 with values like
    col1
    1
    2
    3
    4
    I need to write insert statment for t2 as
    insert into t2(col1,col2) values ('AA',select col1 from t1);
    The output of T2 should be
    col1 col2
    AA 1
    AA 2
    AA 3
    AA 4
    Any help in modifying the query.
    Ashish

    What is wrong with this?
    INSERT INTO id_own_dw.id_t_dw_org_dq_tgt
           (cost_center_cod_vc_old,
            cost_center_cod_vc_new
         SELECT '3016052',<<<_-- this you can replace with your varibale in pl/sql block
                cost_center_cod_vc
           FROM id_own_dw.id_t_dw_msl_org_cctr2mkdiv
          WHERE busi_unit_cod_vc = '3016496'

  • Use of READ REPORT and INSERT REPORT

    Hi Guys,
    i need a small help from u guys.......
    i want to know the use of READ REPORT and INSERT REPORT  with Example
    the requirement is...
    i want to declare an internal table with fields from custom table.
    if any field is aded in the custum table then that field also should get populated in the program.
    Ex: custom table fields are
    MANDT
    BUKRS
    MATNR
    LIFNR
    field1
    field2
    field3
    now suppose if a new field field4 is added in the Table
    then the Program should automatically pick-up the fields from FIELD1...FIELD4.
    i heard by using READ and INSERT report we can do it
    plz help me ...
    Thanks
    Sunil.:-)

    If you're on 46C or above, you can use the following to generate tables dynamically.
    CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
    EXPORTING
    IT_FIELDCATALOG = GT_FIELDCAT
    IMPORTING
    EP_TABLE = GS_DATA_HEAD
    EXCEPTIONS
    GENERATE_SUBPOOL_DIR_FULL = 1
    OTHERS = 2.
    But you are restricted to 32 calls, if I remember correctly.  If you are in a later release, you can use the RTTS classes to create internal tables dynamically, without the restriction on subroutine pools.
    These classes are CL_ABAP_TYPEDESCR and subclasses.
    There are a few blogs on SDN that give examples of their use.
    Matt

  • Date field encryption using Dbms_Obfuscation_Toolkit.DESENCRYPT

    Hi,
    I need to encrypt the date field in the table using Dbms_Obfuscation_Toolkit.DESENCRYPT .
    This is an table is an existing table and is accessed by many interfaces, so we cannot change the column type of this date field.
    Is there a possibility of encrypting the date field and store it in the same column (DATE type).
    And access this using Dbms_Obfuscation_Toolkit.DESDECRYPT.
    We are using Oracle 11.2.0.2.0.
    Thanks in advance.
    Agathya

    >
    Is there a possibility of encrypting the date field and store it in the same column (DATE type).
    >
    No - the DESENCRYPT procedure returns a RAW value which can't be stored in a DATE column.
    See DESENCRYPT Procedures and Functions in Chapter 82 (DBMS_OBFUSCATION_TOOLKIT) of the PL/SQl Packages and Types Doc
    http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_obtool.htm#i997215
    For what you want to do just use the ENCRYPT option of the CREATE TABLE or ALTER TABLE statements.
    See Using Transparent Data Encryption in the Advanced Security Admin Guide
    http://docs.oracle.com/cd/B28359_01/network.111/b28530/asotrans.htm#BABJJAIG
    >
    3.2 Using Transparent Data Encryption
    The following steps discuss using transparent data encryption:
    •Enabling Transparent Data Encryption
    •Setting and Resetting theMaster Encryption Key
    •Opening the Encrypted Wallet
    •Creating Tables with Encrypted Columns
    •Encrypting Columns in Existing Tables
    •Creating an Index on an Encrypted Column
    •Adding or Removing Salt from an Encrypted Column
    •Changing the Encryption Key or Algorithm for Tables Containing Encrypted Columns
    >
    Section 3.2.5.2 Encrypting an Unencrypted Column shows the ALTER TABLE statement for encrypting an existing column - this would leave the column as a DATE and you would work with it normally
    >
    3.2.5.2 Encrypting an Unencrypted Column
    To encrypt an unencrypted column, use the ALTER TABLE MODIFY command, specifying the unencrypted column with the ENCRYPT clause. Example 3-7 encrypts the first_name column in the employee table.
    Example 3-7 Encrypting an Unencrypted Column
    ALTER TABLE employee MODIFY (first_name ENCRYPT);
    The first_name column is encrypted with the default AES192 algorithm. Salt is added to the data, by default.
    You can choose to encrypt the column using a different algorithm. You can also specify NO SALT, if you wish to index the column.

  • Partition by range using greater than or in between statment?

    Can you partition by range using greater than or in between statment? If so, can someone please post the syntax?

    ji**** wrote:
    Can you partition by range using greater than or in between statment? If so, can someone please post the syntax?http://download.oracle.com/docs/cd/B10500_01/server.920/a96524/c12parti.htm
    CREATE TABLE sales_range
    (salesman_id  NUMBER(5),
    salesman_name VARCHAR2(30),
    sales_amount  NUMBER(10),
    sales_date    DATE)
    PARTITION BY RANGE(sales_date)
    PARTITION sales_jan2000 VALUES LESS THAN(TO_DATE('02/01/2000','DD/MM/YYYY')),
    PARTITION sales_feb2000 VALUES LESS THAN(TO_DATE('03/01/2000','DD/MM/YYYY')),
    PARTITION sales_mar2000 VALUES LESS THAN(TO_DATE('04/01/2000','DD/MM/YYYY')),
    PARTITION sales_apr2000 VALUES LESS THAN(TO_DATE('05/01/2000','DD/MM/YYYY'))
    );

  • DBMS_OBFUSCATION_TOOLKIT.MD5

    DBMS_OBFUSCATION_TOOLKIT.MD5(input_string => p_string) translate the p_string parameter into a MD5-string, but cannot accept NULL values? Anyone knows an answer?

    That argument doesn't make much since. If I wanted to know if the value was null or not, I could simply get the MD5 for null (if it would do that) and compare those values. The value of message digest is that the attacker doesn't have any clue what original value he's looking for. It's a simple matter for find matches if I know what I'm looking for. In fact, this technique is commonly employed. It's known as a dictionary assault.

  • I have upgraded my iphone  to iSO version 6 but the problem is the phone was locked it shows that only compatible SIM cards from a supported carrier may be used to activat Iphone.please insert the SIM card that came with your iphone

    i have upgraded my iphone  to iSO version 6 but the problem is the phone was locked it shows that only compatible SIM cards from a supported carrier may be used to activat Iphone.please insert the SIM card that came with your iphone

    So then do as it says...insert the SIM that came w/the phone.

  • Can J2ME use Digest-MD5 Authentication?

    We are writing a Java application with J2ME for cellphones which will use Microsoft MapPoint.net services that requires Digest-MD5 Authentication. Can J2ME use Digest-MD5 Authentication?

    Well, you can either implement it yourself or take a look at :
    http://java.sun.com/products/jce/
    You will probably not want the whole package, but I think you can have access to the sources, so... :-)
    Anthony

  • Error in insert statment in pl/sql

    Hi all,
    How i Execute Insert statment in Pl/Sql
    SQL> DECLARE
    2 tablename varchar2(30);
    3 Begin
    4 begin
    5 select table_name into tablename from user_tables
    6 where table_name=upper('t_calling');
    7 EXCEPTION
    8 WHEN no_data_found then
    9 execute immediate 'create table t_calling(F_CODE number,
    10 F_CALLING varchar2(50))';
    11 INSERT INTO T_Calling VALUES (1, 'asd');
    12 end;
    13 -- --------------------------
    14 Commit;
    15 End;
    16 /
    INSERT INTO T_Calling VALUES (1, 'asd');
    ORA-06550:
    PLS-00201: identifier 'T_CALLING' must be declared
    ORA-06550:
    PL/SQL: SQL Statement ignored
    Thanks
    alaa

    You are creating this table with an execute immediate statement. Which suggests that it doesn't exist yet. Therefore your insert statement is referencing a non-existent table so naturally it won't compile.
    If you really want to do this you should put the insert into an execute immediate statement as well. However, I recommend that you don't do this - it is very bad practice to put this sort of processing in the exception handler. Why? Well, what happens if the table T_CALLING already exists? The exception's got no where to go, so your program fails with an Unhandled Exception error.
    HTH, APC

  • Need Help Improving Memory Use of a Binary Data Insert

    I am using the following code to insert binary data from an InputStream into a database.
    It seems to be very memory inefficient. It works fine for small files. But for large files it really causes memory issues.
    Imagine this coming from a 22mb file upload. This method first copies 22megs of data to an ArrayList. It then copies the data to an array. It then creates another array to store the bytes. Finally it inserts the data to the database.
    Is there another way I can get data into a format that the setBytes() method can accept without using so much memory?
            * Inserts Binary Database into the Database
           private void insertData(InputStream stream){
             ConnectionPool pool = (ConnectionPool)properties.getProperty("zeusportal.connectionpool");
             Connection conn = null;
             BufferedReader in = new BufferedReader(new InputStreamReader(stream));
             try{
               byte[] byteArray;
               int streamlength = 0;
               int value;
                  //Read Data Into Arraylist
               ArrayList list = new ArrayList();
               while((value = stream.read()) != -1){
                 list.add(new Integer(value));
               Object data[] = list.toArray();
                  //Create Byte Array to store bytes
               byteArray = new byte[data.length];
                  //Copy Data from ArrayList into Byte Array
               for(int iCounter = 0; iCounter < byteArray.length; ++iCounter){
                 Integer curr = (Integer)data[iCounter];
                 byteArray[iCounter] = curr.byteValue();
                  //Retrieve Connection
               conn = pool.getConnection();
               conn.setAutoCommit(false);
               PreparedStatement pstmt = conn.prepareStatement("INSERT INTO table (video_name, video_description, video_contenttype, video_content, upload_date, objecttype, objectid) values(?, ?, ?, ?, ?, ?, ?)");
                  //Insert Data Attributes into PreparedStatement
               pstmt.setString(1, this.name);
               pstmt.setString(2, this.description);
               pstmt.setString(3, this.contenttype);
               pstmt.setBytes(4, byteArray);
               pstmt.setInt(6, objectType);
               pstmt.setLong(7, objectID);
               this.date = new java.util.Date();
               pstmt.setLong(5, date.getTime() / 1000L);
               pstmt.execute();
               pstmt.close();
               conn.commit();
               conn.setAutoCommit(true);
             catch(SQLException sqle){
               throw new RuntimeException(sqle);
             catch(IOException ioe){
               throw new RuntimeException(ioe);
             finally{
               if(conn != null){
                 pool.releaseConnection(conn);
             return;
           }//insertData

    I have tried storing the data in a temp file and then retrieved the length of the file. That however didn't work as the data was corrupted for anything but the smallest files.
            * Inserts the data into the database
           private void insertData(InputStream stream){
             ConnectionPool pool = (ConnectionPool)properties.getProperty("zeusportal.connectionpool");
             Connection conn = null;
             BufferedInputStream in = new BufferedInputStream(stream);
             try{
                      //Create Temporary File to Store Binary Data
                File file = File.createTempFile(Math.random()+"", ".tmp");
                      //Create a writer to write to the Temp File
                OutputStream writer = new FileOutputStream(file);
                      writer = new BufferedOutputStream(writer);
               int value;
                  //Copy Data to Temp File
               while((value = in.read()) != -1){
                 writer.write(value);
               writer.flush();
               writer.close();
                  //Read new InputStream from Temp File
               stream = new FileInputStream(file);
               //Retrieve Connection
               conn = pool.getConnection();
               conn.setAutoCommit(false);
                  //Inset Data to the database
               PreparedStatement pstmt = conn.prepareStatement("INSERT INTO zeusportalvideos (video_name, video_description, video_contenttype, video_content, upload_date, objecttype, objectid) values(?, ?, ?, ?, ?, ?, ?)");
               pstmt.setString(1, this.name);
               pstmt.setString(2, this.description);
               pstmt.setString(3, this.contenttype);
               pstmt.setBinaryStream(4, stream, (int) file.length());
               pstmt.setInt(6, objectType);
               pstmt.setLong(7, objectID);
               this.date = new java.util.Date();
               pstmt.setLong(5, date.getTime() / 1000L);
               pstmt.execute();
               pstmt.close();
               stream.close();
               file.delete();
               conn.commit();
               conn.setAutoCommit(true);
             catch(SQLException sqle){
               throw new RuntimeException(sqle);
            catch(IOException ioe){
               throw new RuntimeException(ioe);
             finally{
               if(conn != null){
                 pool.releaseConnection(conn);
             return;
           }//insertData

  • Last night while I was using my MacBook pro, it suddenly restart itself and it hang at the white screen. I tried to restart 5-6 times but it appeared to be the same result! Help me!!!,!,

    Last night while I was using my MacBook pro, it suddenly restart itself and it hang at the white screen. I tried to restart 5-6 times but it appeared to be the same result! Help me!!!,!,

    Boot in safe mode

  • AD authentication using DIGEST-MD5: users have to reset password?

    We are using DIGEST-MD5 to authenticate users against Active Directory. Our application ask users for user name and password and pass them to the attached java code. The strange thing is that it works for about 98% of users and it won't work for 2% of users. For those 2% of users, they can login into our domain but the same password won't work for our application.
    We have found the workaround will be to ask those users to change their Windows password and after that they will be able to login.
    My question is why= changing a user's password will make a difference for those 2% users? I am really puzzled.
    Thanks!
    try {
    Hashtable authEnv = new Hashtable();
    //set security credentials, note using DIGEST-MD5
    //Requires user account to be stored with reversible encryption
    authEnv.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
    authEnv.put(Context.PROVIDER_URL, ldapURL);
    authEnv.put(Context.REFERRAL,"follow"); // required
    authEnv.put(Context.SECURITY_AUTHENTICATION, "DIGEST-MD5");
    authEnv.put(Context.SECURITY_PRINCIPAL, creds.getUsername());
    authEnv.put(Context.SECURITY_CREDENTIALS, creds.getPassword());
    DirContext ctx1 = new InitialLdapContext(authEnv,null);
    } catch (Exception ex) {
    logger.info("Error authenticating user " + creds.getUsername(), ex);
    throw new AuthenticationException("Authentication Failed for user " + creds.getUsername());
    }

    Make sure which version of AD you are using: AD 2000 or AD 2003. For AD 2000, reversible encryption is required and it's not secure. That's why lots administrators do not like it. But for AD 2003, there is no need for password to be stored in reversible way. But there is limitation as to the client application. What works for AD 2000 may not work for AD 2003. For details, you can check the link below:
    http://www.forumeasy.com/forums/thread.jsp?tid=115170863235&fid=ldapprof5&highlight=Why+DIGEST-MD5+Authentication+Does+Work
    which summarized all working and not-working cases of Digest-Md5 authentication for SunOne, AD 2000 and AD 2003. It's quite informative.

Maybe you are looking for