MD5. DBMS_CRYPTO. Hash vs java.security.MessageDigest

Hello
I have xml in a CLOB column.
I want to get MD5 with DBMS_CRYPTO. Hash:
(Oracle Database 10g Enterprise Edition Release 10.2.0.5.0)
SET SERVEROUTPUT ON
DECLARE

  vXml_ CLOB;
  tam NUMBER;

  l_hash   raw(2000);
  l_hashCa   varchar2(2000);

BEGIN

  SELECT COL, dbms_lob.getlength(COL) AS TAMA
  INTO vXml_, tam
  FROM BORRAME 
  WHERE ID = 1;

  l_hash := DBMS_CRYPTO.Hash (
     vXml_,
     DBMS_CRYPTO.HASH_MD5);

  l_hashCa := lower(rawtohex(l_hash));

  dbms_output.put_line('Size: ' || tam);
  dbms_output.put_line('Hash: ' || l_hash);
  dbms_output.put_line('Hash-1: ' || l_hashCa);

END;
/
Size: 9902
Hash: 36D0C059092B450C0598EBFECC015FF5
Hash-1: 36d0c059092b450c0598ebfecc015ff5
I need get MD5 even with java.security.MessageDigest.
Create
SET def off
create or replace java source named "MD5" as 
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.sql.Clob;
import java.sql.Blob;
 
public class MD5 {
  public static String getMD5HashFromClob(Clob inhalt) throws Exception{

    MessageDigest algorithm;
    StringBuffer hexString;
    String s;
    String salida = null;
    int i;
    byte[] digest;

    String tepFordigest = inhalt.getSubString(1L, (int)inhalt.length());

    try {
        algorithm = MessageDigest.getInstance("MD5");
        algorithm.reset();
        algorithm.update(tepFordigest.getBytes());

        digest = algorithm.digest();

        hexString = new StringBuffer();
        for (i = 0; i < digest.length; i++) {
            s = "0" + Integer.toHexString(0xFF & digest);
hexString.append(s.substring(s.length() - 2));
}

salida = hexString.toString();
} catch (java.security.NoSuchAlgorithmException nsae) {
salida = "No es posible cifrar MD5";
}
return salida;

}
}
/
sho err



alter java source "MD5" compile
/
sho err

CREATE OR REPLACE FUNCTION get_md5_CLOB(inhalt CLOB) RETURN VARCHAR2 DETERMINISTIC
AS LANGUAGE JAVA
name 'MD5.getMD5HashFromClob(java.sql.Clob) return java.lang.String';
/
Now, i use:
SET SERVEROUTPUT ON
DECLARE

vXml_ CLOB.
TAM NUMBER;

l_hash raw (2000);
l_hashCa varchar2 (2000);

BEGIN

SELECT COL, dbms_lob.getlength (COL) AS TAMA
IN vXml_, tam
OF BORRAME
WHERE ID = 1;

l_hash: = get_md5_CLOB (vXml_);

l_hashCa: = lower (rawtohex (l_hash));

dbms_output.put_line (' size: ': tam);
dbms_output.put_line ('Hash: ' | l_hash);
dbms_output.put_line ('Hash-1: ' | l_hashCa);

END;
/
Size: 9902
Hash: 77E252BC18244BEDDE13072BC3918DBF
Hash-1: 77e252bc18244bedde13072bc3918dbf
Why are they different???:
36d0c059092b450c0598ebfecc015ff5
77e252bc18244bedde13072bc3918dbf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

>
Can you think of another mistake?
>
Not an error but the character set used by Java (UTF-16) may be different. The Crypto package always converts all AL32UTF8 before you chop it up, so if the Java character set is different the hash may be different.

If you look at the technical header for DBMS_CRYPTO package it shows it's not:
>
-Front of encryption, hashing or hashing key, the CLOB data type is
-AL32UTF8 converted. This allows cryptographic data
-transferred and between different databases
-Character between the character set change sets, and
-separate processes (for example, Java programs).
--

Tags: Database

Similar Questions

  • Java security warning makes v19 and v20 firefox crashing

    After the security warning popup windows is indicated, if I do nothing for 2-3 seconds, firefox crashes.

    Hello
    Thanks for your suggestion.

    The problem has been resolved by forcing the developer to the page to remove the annoying Java security warning.
    After removing the Java window, firefox crashes is no longer.
    Firefox update action is not necessary.

    See you soon.

  • java.security.AccessControlException on the socket connection

    Hi all

    I'm java.security.AccessControlException on open socket connection, I added permissions API, looks like I missed something.

    SocketConnection sc = null;

    try {}

    SC = (SocketConnection)

    Connector.Open ("socket://10.91.40.120:1883"); ")

    } catch (IOException ex) {}

    Logger.getLogger (NetworkAPI.class.getName ()) .log (Level.SEVERE, null, ex);

    }

    APIpermissions.jpg

    Hello

    You need javax.microedition.io.SocketProtocolPermission to access socket connection.

    Please add the following permissions to the project:

    -client connection: javax.microedition.io.SocketProtocolPermission "socket / / *: *:

    -Server connection javax.microedition.io.SocketProtocolPermission "socket / /: *:

    Concerning

    Alexey

  • Bundle Native Bird java.security.NoSuchAlgorithmException

    I am trying to build a native bundle, especially for mac os x, but also in windows. And in both environments the .app, .dmg, .exe download generated correctly, but when I run it, I get a lot of exceptions java.security.NoSuchAlgorithmException. For example:
    Caused by: java.security.NoSuchAlgorithmException: SunTlsRsaPremasterSecret not available KeyGenerator

    Caused by: java.security.NoSuchAlgorithmException: SecretKeyFactory PBEWithMD5AndDES unavailable

    My program uses security TLS connections in xmpp. And I also have a webview with HTTPS which does not load eighter.

    Does anyone have any idea why this might be happening?
    I acknowledge that if I run the generated only jar, it in works very well, it only happens with the .exe and. app.
    It's my build.xml fx: deploy code:

    "< fx: deploy width =" ${javafx.run.width} "height =" ${javafx.run.height} ".
    nativeBundles = "all".
    OutDir = "${basedir} / ${dist.dir} ' outfile =" ${application.title} ">"
    < fx:application name = "${application.title}" "
    mainClass="${javafx.main.class}"/ >
    < fx:resources >
    < fx:fileset dir = "${basedir} / ${dist.dir} '"
    includes = "*.jar" / >
    < fx:fileset dir = "${basedir} / ${dist.dir}" includes="lib/*.jar"/ > "
    < / fx:resources >
    < fx:info title = "${application.title}" "
    Vendor = "${application." Vendor} "/ >"
    < / fx: deployment >

    Appreciate your help.

    Published by: ascuccimarra on February 20, 2013 13:36

    This solution might work for you.
    http://StackOverflow.com/questions/13356633/JavaFX-WebView-not-loading-HTTPS-page/13599131#13599131

  • java.security.InvalidKeyException:Elgamal

    I am trying to encrypt and decrypt Elgaman but I am getting error of
    Erick: Exception: java.security.InvalidKeyException: illegal for size or default parameters
    java.security.InvalidKeyException: illegal for size or default parameters
    at javax.crypto.Cipher.a(DashoA13*..)
    at javax.crypto.Cipher.init(DashoA13*..)
    at org.students.RSA2.testGP(RSA2.java:71)
    at org.students.RSA2.performTest(RSA2.java:277)
    at org.bouncycastle.util.test.SimpleTest.perform (unknown Source)
    at org.bouncycastle.util.test.SimpleTest.runTest (unknown Source)
    at org.bouncycastle.util.test.SimpleTest.runTest (unknown Source)
    at org.students.RSA2.main(RSA2.java:291)
    i installed the JDK 5.0 Update 22 and download the jce from 
    http://www.oracle.com/technetwork/java/javase/downloads/index-jdk5-jsp-142662.html and installed in 
    C:\Program Files\Java\jdk1.5.0_22\jre\lib\security
    but It give me same error .Please help me. Thanks in advance
    
    Edited by: user11357554 on Apr 17, 2011 2:06 PM
    
    Edited by: EJP on 18/04/2011 11:41: added code tags. Please use them.
    
    Edited by: user11357554 on Apr 22, 2011 9:47 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

    user11357554 wrote:
    I installed the JDK 5.0 Update 22 and download the jce to
    http://www.Oracle.com/technetwork/Java/javase/downloads/index-JDK5-JSP-142662.html and installed in the
    C:\Program Files\Java\jdk1.5.0_22\jre\lib\security

    I don't think you can have followed installation instructions "unlimited strength". You must decompress the unlimited 'force' file and copy the contents of the subdirectory of PvE is directly in the C:\Program Files\Java\jdk1.5.0_22\jre\lib\security directory.

    PS why are you using JDK1.5?
    PS - 1. When you convert a string to/from bytes ALWAYS specify the character encoding as the default character encoding is probably very different for different OS, OS variants, and variants of Java.
    PS - 2. Never use string as a container for the binary data and ciphertext IS binary data.

  • java.security.InvalidKeyException: illegal key size

    Hello

    I developed an application of adf using jdeveloper 11g how weblogic 10.3.3.0 hosts.
    My adf application must connect to an external application for credit card validation.
    To do this, I use a HTTPURLConnection and passing the external address and attributes that must be written into it.
    The external application that I am trying to connect is secure starts with https://...
    I get an error as soon I try to open the "connection.getOutputStream ()".
    Here is the error I get
    <Oct 8, 2010 10:32:54 AM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=T-TeleSec GlobalRoot Class 3,OU=T-Systems Trust Center,O=T-Systems Enterprise Services GmbH,C=DE". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.> 
    <Oct 8, 2010 10:32:54 AM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=T-TeleSec GlobalRoot Class 2,OU=T-Systems Trust Center,O=T-Systems Enterprise Services GmbH,C=DE". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.> 
    <Oct 8, 2010 10:32:54 AM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=GlobalSign,O=GlobalSign,OU=GlobalSign Root CA - R3". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.> 
    <Oct 8, 2010 10:32:54 AM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "OU=Security Communication RootCA2,O=SECOM Trust Systems CO.\,LTD.,C=JP". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.> 
    <Oct 8, 2010 10:32:54 AM CDT> <Notice> <Security> <BEA-090898> <Ignoring the trusted CA certificate "CN=KEYNECTIS ROOT CA,OU=ROOT,O=KEYNECTIS,C=FR". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.> 
    java.security.InvalidKeyException: Illegal key size
         at javax.crypto.Cipher.a(DashoA13*..)
         at javax.crypto.Cipher.init(DashoA13*..)
         at javax.crypto.Cipher.init(DashoA13*..)
         at com.certicom.tls.provider.Cipher.init(Unknown Source)
         at com.certicom.tls.ciphersuite.SecurityParameters.createWriteCipher(Unknown Source)
         at com.certicom.tls.record.handshake.HandshakeHandler.changeCipherSpec(Unknown Source)
         at com.certicom.tls.record.handshake.ClientStateReceivedCertificate.handle(Unknown Source)
         at com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessage(Unknown Source)
         at com.certicom.tls.record.handshake.HandshakeHandler.handleHandshakeMessages(Unknown Source)
         at com.certicom.tls.record.MessageInterpreter.interpretContent(Unknown Source)
         at com.certicom.tls.record.MessageInterpreter.decryptMessage(Unknown Source)
         at com.certicom.tls.record.ReadHandler.processRecord(Unknown Source)
         at com.certicom.tls.record.ReadHandler.readRecord(Unknown Source)
         at com.certicom.tls.record.ReadHandler.readUntilHandshakeComplete(Unknown Source)
         at com.certicom.tls.interfaceimpl.TLSConnectionImpl.completeHandshake(Unknown Source)
         at com.certicom.tls.record.WriteHandler.write(Unknown Source)
         at com.certicom.io.OutputSSLIOStreamWrapper.write(Unknown Source)
         at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:66)
         at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
    Here is the code I use to connect to the external Web site.
        URL url;   
        HttpURLConnection connection = null;  
        try {     
          //Create connection   
          url = new URL(targetURL);  
          connection = (HttpURLConnection)url.openConnection();    
          connection.setRequestMethod("POST"); 
          connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); 
         connection.setRequestProperty("Content-Length", "" + Integer.toString(urlParameters.getBytes().length)); 
          connection.setRequestProperty("Content-Language", "en-US");   
          connection.setUseCaches (false);  
           connection.setDoOutput(true);  
           DataOutputStream wr = new DataOutputStream (       
               connection.getOutputStream ());
                wr.writeBytes (urlParameters);   
                wr.flush ();   
          wr.close ();    
                //Get Response    
          InputStream is = connection.getInputStream();   
          System.out.println("after getting input stream");
        BufferedReader rd = new BufferedReader(new InputStreamReader(is));   
          System.out.println("after BUffered reader");
        String line;   
        StringBuffer response = new StringBuffer();   
          System.out.println("after String buffer");
        while((line = rd.readLine()) != null) {      
          response.append(line);    
          response.append('\r');   
          }      rd.close();   
        return response.toString();
        } catch (Exception e) {  
          e.printStackTrace();    
          return null;  
          } finally {  
          if(connection != null) {       
            connection.disconnect();   
            }  
          } 
        }
    I am currently totally distraught, I don't understand what measures should I take. Is this error due to keystore stuff?
    I even tried to replace policy files in jre according to some articles, but it still does not work.
    I have very limited knowledge of the security issues with weblogic, I really will appreciate if I can get all the links or any help in this matter.

    Thanks in advance
    Ash

    You might find this useful

    http://WebLogic-wonders.com/WebLogic/2010/01/28/troubleshooting-SSL-issues/

  • java.security.AccessControlException:access denied

    Hello
    I'm going to oracle10g forms.i have created the dialog box browse file using java beans. Code Java itself works fine.i could able to browse a file and open it.but when I try to call from forms the following exception has occurred.
    denied java.security.AccessControlException:access (java.io.FilePermission C:\arul\temp\Photos read).

    I installed YPI. so my path of the java folder is
    C:\Program Files\Java\jdk1.5.0_10

    I put the java jar file in the java folder forms and under directory ext jdk.

    I was running the form locally using OC4j.

    I changed the java policy file in the location following (bold lines).
    C:\Program Files\Java\jdk1.5.0_10\jre\lib\security


    Standard extensions gets all the default permissions

    give the code "file:${{java.ext.dirs}}/*" {}
    permission java.security.AllPermission;


    };

    default permissions granted to all areas

    grant {}
    Allows any thread stop itself using the Java.lang.Thread.Stop
    a method that takes no arguments.
    Note that this permission is granted by default only to stay
    backward compatible.
    It is strongly recommended that you either withdraw this permission
    This policy of the file or it further limit sources of code
    you specify because Thread.stop () is potentially dangerous.
    See 'http://java.sun.com/notes' for more information.
    permission java.lang.RuntimePermission "stopThread;

    allows anyone listening on unprivileged ports
    java.net.SocketPermission permission "localhost:1024 -", "listen";

    properies 'standards' that can be read by anyone

    * permission java.io.FilePermission "C:\\arul\\temp\\Photos\\*", "read, write"; **
    * permission java.io.FilePermission "${user.home} ${/} *", "read"; **
    permission java.util.PropertyPermission "java.version", "read";
    permission java.util.PropertyPermission "java.vendor", "read";
    permission java.util.PropertyPermission "java.vendor.url", "read";
    permission java.util.PropertyPermission "java.class.version", "read";
    permission java.util.PropertyPermission "os.name", "read";
    permission java.util.PropertyPermission "os.version", "read";
    permission java.util.PropertyPermission "os.arch", "read";
    permission java.util.PropertyPermission "file.separator", "read";
    permission java.util.PropertyPermission "path.separator", "read";
    permission java.util.PropertyPermission "line.separator", "read";

    permission java.util.PropertyPermission "java.specification.version", "read";
    permission java.util.PropertyPermission "java.specification.vendor", "read";
    permission java.util.PropertyPermission "java.specification.name", "read";

    permission java.util.PropertyPermission "java.vm.specification.version", "read";
    permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
    permission java.util.PropertyPermission "java.vm.specification.name", "read";
    permission java.util.PropertyPermission "java.vm.version", "read";
    permission java.util.PropertyPermission "java.vm.vendor", "read";
    permission java.util.PropertyPermission "java.vm.name", "read";
    };

    Could someone help how to fix this problem? If I need to change the policy file of java or any file of client policy?

    Thank you
    Jean Elo

    Here is my makecert.bat:

    off @echo
    REM ******************************************************************
    REM * This script generates a self signed certificate for
    REM * JAR files using the settings defined in the signer.properties
    REM * file
    REM * This script must be run once to create the certificate
    REM * the certificate will be valid for 360 days
    REM ******************************************************************
    REM * DRMILLS June 18, 2003 - creation
    REM ******************************************************************

    for /F "eol = # tokens = 1, 2 * delims ==" %%d set in (signer.properties) %% I = %% j

    "c:\DevSuiteHome_1\jdk\bin\keytool" - genkey - dname "cn = Degrelle, OU = development, o = Oracle, c = EN' - alias fdegrelle - keypass fdegrelle - keystore"C:\Program Files\Java\jre1.6.0_03\lib\security\keystore"- storepass jinitiator-validity 360
    @echo created certificate...

    And my sign.bat

    CLS
    off @echo
    REM ******************************************************************
    REM * This script sign a jar file using the certificate
    REM * defined in the signer.properties file
    REM *.
    REM * This script can be executed as often it takes on any container
    REM * a backup copy of the jar file is created
    REM ******************************************************************
    REM * DRMILLS June 18, 2003 - creation
    REM *******************************

    for /F "eol = # tokens = 1, 2 * delims ==" %%d set in (signer.properties) %% I = %% j

    copy/y %1 %1.unsigned
    @echo we
    "c:\DevSuiteHome_1\jdk\bin\jarsigner" - keystore "C:\Program Files\Java\jre1.6.0_03\lib\security\keystore" - storepass jinitiator - keypass fdegrelle %1 fdegrelle
    @echo signature complete...

    François

  • accept guests of Java security in Firefox on non-persistent desktops view

    Hi all

    Here's our environment...

    1. view 6.1

    2. a pool Nopersistent offices Windows 7 Enterprise

    3 Java 32 bits version 8 day 72

    4 Firefox 34.0.5

    Run us a Java Application (banner) and when you fire in Firefox it shows 2 application prompt, both applications are trusted publishers is not a matter of trust. Because they are non-persistent desktops that our end users bring each time that they restart it. Whats odd is that we have been able to ignore these warnings with IE using strategies of group two, one to be saved in the "trusted publishers" request certificates store and another to add the URL of the application to IE Trusted Sites. I'm not sure how to work around this problem in Firefox

    I enable the Java Console and turned on a high level of forest exploitation, and when I got one of these application guests I clicked on the option "don't show this new editor applications and the location above. When I did that the Java console displays the following...

    Security: the user granted the privileges to the code forever

    Security: deployment of C:\Users\deptsfs\AppData\LocalLow\Sun\Java\Deployment\security\trusted.certs loading certificates

    Security: responsible for deployment from C:\Users\deptsfs\AppData\LocalLow\Sun\Java\Deployment\security\trusted.certs certificates

    Security: registration of certificates of deployment in C:\Users\deptsfs\AppData\LocalLow\Sun\Java\Deployment\security\trusted.certs

    Security: safe deployment in C:\Users\deptsfs\AppData\LocalLow\Sun\Java\Deployment\security\trusted.certs certificates

    I know I'm grabbing at straws here but y at - he called a way to manipulate the contents of the file "trusted.certs" to the user with a logon script via group policy so that Publisher/App/location is always approved?

    Thank you

    So... my grad last idea is to deploy the trusted.certs file in the default profile on your master image and test to see if this file is available in-house for new users. Do you know how to copy a user profile in the default user profile in Windows 7?

  • DreamWeaver CS5.5 Java security

    How to upgrade Java DreamWeaver CS5.5 on 64-bit Windows7? Can I manually remove files from JAVA C:\Program Files (x 86) \Adobe\Adobe Dreamweaver CS5.5\JDK and C:\Program Files (x 86) \Adobe\Adobe Dreamweaver CS5.5\JVM? These are huge security issues.

    The Dreamweaver application uses these files for the operation of the program, they are not the version of Java used by your browser.  This version is stored elsewhere on your system.  It is possible for applications to need different versions of Java to run and to simultaneously run multiple versions.  If you are worried about the version that runs, you could update DW to the latest version.  4 releases in DW have been since the era where CS 5.5 was released.

  • Pot of icons of the 11g Java security concern

    Hello

    I created a jar containing my incos app and I had signed with the help of script sign_webutil.sh and he added to the setting of archive on the web configuration file, but each time users access the application a warning: 'Java discovered application components that could indicate a security problem.

    User who can I use to sign the file in unix? can I copy or add the .keystore file generate in any place?

    Thanks in advance
    Hernan

    See the following note to MyOracleSupport for more information:

    + (Doc ID 1081755.1) 'Java has discovered application components that could indicate a security problem' warning with jre 1.6 update 19 ++

  • have several Java security warnings whenever I try to open a game of Pogo... "the required version of Java 1.6.0 - oem is not the latest and may not contain the latest updatesw of security...".

    I worry because I get a shortcut on the desktop called hs_err_pid4 or _pid5.

    It looks like a virus, but I'm not sure what the hell's going on?  Can you help me?

    Hi Raebud,

    1. you remember to make changes to your computer before the problem?

    Follow these steps and check if the problem persists.

    Step 1:

    I suggest that you uninstall the old version of Java and install the latest version and check if the problem persists.

    Please follow the steps in this article and see if the problem still occurs.

    http://www.Java.com/en/download/FAQ/OEM.XML

    Step 2:

    If you think that the problem is related to viral attacks, I wish you launch a full scan using the Microsoft Safety Scanner and check if the problem persists.

  • Collection to contain the object type? OR typical hash in java?

    Hi people,
    I used to work in perl and use hashes a lot (a typical perl hash is String = > string). Well now, I am doing something a bit dirty - I need something that does what the class that I put in place down, it doesn't... Y at - it such an object which wouldn't bother me that the keys and values are not unique (can be same values with the keys and values). What I must apply myself, or is there something that does this...
    No collection seems to fit in this...


    public class CantFindYouInJava {}
    private String [] listOfKeys;
    private String [] listOfValues.
    ' Public Sub put (String key, String value) {}
    where int = listOfkeys.length + 1;
    listOfKeys [where] = key;
    listOfValues [where] = value;
    }
    ..
    }

    koszta5 wrote:
    I need an object that did what did the class that I've set up there... Y at - it such an object which wouldn't bother me that the keys and values are not unique (can be same values with the keys and values). What I must apply myself, or is there something that does this...

    It really depends on what the relationship between a key and its associated value, and the kind of performance you expect to recover from.

    Kayaman suggestion is probably the best if the relationship of key / value is 1-to-many; You can also write your own map> class. If it's really one-to-many, and you need good performance in both directions, you may need to wrap two MultiMaps - one go of the key values and a second to go in the other direction. Don't know what you'd call it however.

    Winston

  • loadjava jdbc mysql - error

    Hello!

    I m trying to load the mysql connector into the oracle database.

    I create a package to connect to mysql and all that's missing is the jdbc driver.

    So I run loadjava, but I m the below error. Can someone help me?

    Oracle 10 g database

    arguments: '-u' 'vendas/***@idev10g' '-v' '-resolve' '/ora10g/app/oracle/product/10.2.0/db_1/jlib/mysql-connector-java-5.1.12.jar' 
    dropped  : JAVA$CLASS$MD5$TABLE
    Exception in thread "main" java.lang.UnsatisfiedLinkError: getClassContext
            at com.ibm.jvm.classloader.ClassLoaderUtils.getLastClassLoader(ClassLoaderUtils.java:38)
            at java.security.Provider.loadProvider(Provider.java:209)
            at java.security.Security$2.run(Security.java:434)
            at java.security.AccessController.doPrivileged1(Native Method)
            at java.security.AccessController.doPrivileged(AccessController.java:351)
            at java.security.Security.getProviderAt(Security.java:431)
            at java.security.Security.getAlgClassName(Security.java:583)
            at java.security.Security.getAlgClassName(Security.java:637)
            at java.security.Security.getImpl(Security.java:1118)
            at java.security.MessageDigest.getInstance(MessageDigest.java:135)
            at oracle.aurora.server.tools.loadjava.SchemaObject.MD5OfStream(SchemaObject.java:730)
            at oracle.aurora.server.tools.loadjava.SchemaObject.getNewMD5(SchemaObject.java:418)
            at oracle.aurora.server.tools.loadjava.SchemaObject.doCreate(SchemaObject.java:174)
            at oracle.aurora.server.tools.loadjava.SchemaObject.process1(SchemaObject.java:215)
            at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:548)
            at oracle.aurora.server.tools.loadjava.LoadJava.addObject(LoadJava.java:529)
            at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:467)
            at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:396)
            at oracle.aurora.server.tools.loadjava.LoadJava.addJar(LoadJava.java:743)
            at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:448)
            at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:396)
            at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:365)
            at oracle.aurora.server.tools.loadjava.LoadJava.add(LoadJava.java:668)
            at oracle.aurora.server.tools.loadjava.LoadJava.processDeferredFiles(LoadJava.java:633)
            at oracle.aurora.server.tools.loadjava.LoadJava.process(LoadJava.java:834)
            at oracle.aurora.server.tools.loadjava.LoadJava.command(LoadJava.java:267)
            at oracle.aurora.server.tools.loadjava.LoadJavaMain.run(LoadJavaMain.java:164)
            at oracle.aurora.server.tools.loadjava.LoadJavaMain.main(LoadJavaMain.java:89)
    

    I solved it.

    I had to increase the pool of java memory (first time I run the server complained to this topic) and then load the driver jdbc mysql running in sqlplus:

    dbms_java.loadjava ("jdbc driver file path '");

    When running the console, the command loadjava require additional information (LD_LIBRARY_PATH etc.) giving the above mentioned error.

    Running sqlplus is ready.

  • DBMS_CRYPTO. HASH returns the value encrypted letters

    Hi all

    SE 12.1

    I'm using dbms_crypto. Hash to encrypt the values. But encrypted the returned string is at the top of the case. Calling WebService Im externally requires the proper case...  I've seen other ciphers (java-based) hash functions that seem to properly encrypt with a mixture of cases, what I need.

    Is it possible to return the string that is encrypted in the proper case.

    DECLARE

    l_ccn_raw RAW (128);

    BEGIN

    l_ccn_raw: = utl_raw.cast_to_raw('1234');

    l_ccn_raw: = dbms_crypto.hash (l_ccn_raw, dbms_crypto.hash_sh256);

    dbms_output.put_line (' TOKEN: ' |) ( l_ccn_raw) ;

    END;

    You can always try dbms_output.put_line (' TOKEN: ': bass (l_ccn_raw));

    But are you sure that you don't need a hashvalue base64-coded?

    dbms_output.put_line (' TOKEN: ' | utl_raw.cast_to_varchar2 (utl_encode.base64_encode (l_ccn_raw)));

  • ATG 10.1.2 - Changig AES128-SHA of MD5 hash password

    Hi all

    We currently use md5 password hash. For some security issues, we need to change it to use AES128-SHA.

    Any body can help me what are the need for steps to follow. Thank you

    You must write a utility that will do this job for you.

    -Remove overlay MD5 and let the user enter their password, then the utility will compare the MD5 hash with code in Pb, if the hash matches then encrypt their password with encryption AES128 and save in the comic book. Mark a flag in the BD so this activity not be made once for each customer.

    -Another workaround possible that would be easy, it is that you remove the group all users to do a password reset and superposition of MD5.

    Thank you

    Adnane

Maybe you are looking for

  • My HP 7 stream working lights

    I have never had a problem with that first and foremost but today I went to turn it on and it won't just turn. It is not yet a year. I know that his load.

  • HP Pavilion 15-n241ca TouchSmart laptop touch does not

    I got this laptop a few months there are source in Alberta in the Canada. Worked well for a week or two and then the touchscreen began to stop working intermittently. Once or twice, it seemed that permits to clean the screen (not salty) but no more.

  • HP Pavilion g6-1202sa: HP Pavilion g6-1202sa drivers for the NETWORK card

    I will have questions re-construction of my laptop, which had an error of hard disk and is not re-coverable. I have re-installed my OS 'Windows 7 Unltimate' on the laptop, but then I try and install the wireless and network drivers, I discovered it's

  • find cirlces in image

    LabVIEW has all the functions that can display an image and choose cirlces? I have a JPG file that contains the following images:The background is almost entirely white. There are black spots (almost circular), about 4 per image. Is there a function

  • Laptop HP G62-363NR PC BIOS PASSWORD

    Laptop HP G62-363NR systemdisable code 68157704 How can I reset bios password?