Implement DESEncrypt and DESDecrypt in Java

Hello!
I'd like to reimplement the methods DESEncrypt and DESDecrypt, which are part of the dbms_obfuscation_toolkit, in Java, in order to be able to use EJBs mapped to tables containing encrypted data. The problem is that I can't find all the implementation details of these functions:
DES is the algorithm: this is OK.
Which chaining mode is used? I have tried ECB, and it doesn't work as soon as the input is more than 8-bytes long.
I also tried CBC and the other ones, but I need an IV to use them, and I don't know what IV is used by DESEncrypt and DESDecrypt.
Which padding mode is used? NoPadding? PKCS5Padding?
The only thing that works is DES/ECB/NoPadding, for inputs less than 8 bytes long. For longer inputs, I need more information.
JB.

Thanks for your help. I forgot to mention that I was using Oracle 8.1.7.
Anyway, after more experiments, I finally managed to find out what the exact algorithm parameters are:
Algorithm: DES
Chaining mode: CBC
Padding mode: NoPadding
IV: byte array containing only zeros (8 bytes long)
JB.

Similar Messages

  • Creating stubs for a java class which implements ejbobject and ejbHome

    Hi,
    I am using the weblogic rmic utility to generate WLStub of a class which implements
    EJBHome and EJBObject. The stubs are being generated with the name...WLStub261b2l255i2g1h1324e2u702w6fn1t.class
    rather than with the name_WLStub as it should be and as the server wants it to
    be when I try to bind this object using JNDI.
    I appreciate your help.
    Thanks,
    Kamps

    Have you tried the -nomanglednames option as from:
    Usage: java weblogic.rmic [options] <classes>...
    where options include:
    -help Print this help message.
    -version Print version information.
    -d <dir> Target (top-level) directory for compilation.
    -nontransactional Suspends the transaction before making the
    RMI call and resumes after
    -verbosemethods Instruments proxies to print debug info to
    std err.
    -descriptor <example> Associates or creates a descriptor for each
    remote class.
    -nomanglednames Don't mangle the names of the stubs and
    skeletons.
    kamps wrote:
    >
    Hi,
    I am using the weblogic rmic utility to generate WLStub of a class which implements
    EJBHome and EJBObject. The stubs are being generated with the name...WLStub261b2l255i2g1h1324e2u702w6fn1t.class
    rather than with the name_WLStub as it should be and as the server wants it to
    be when I try to bind this object using JNDI.
    I appreciate your help.
    Thanks,
    Kamps

  • How to compile and register a Java CFX tag with multiple class files?

    All-
    If this is the wrong forum for CFX questions, please let me
    know.
    I need to determine how to compile and register a Java CFX
    tag that contains multiple class files. One class file implements
    the CustomTag interface and the other class files implement various
    supporting classes. All of the documentation that I have found
    talks about using a single class file. I am assuming that a JAR
    file will be involved, but I am not sure of the specifics.
    Thanks in advance for your help.
    -Josh

    Yes, it will involve a jar. Use your java IDE (eclipse,
    etcetera ..) to create a jar containing all of the classes. Check
    your ide's documentation for how to create jar files. After you
    have created the jar, place the jar in the CF class path so CF will
    recognize it. For example the {cf_root}/WEB-INF/lib directory. CF
    must be restarted before it will detect the new jar. After
    restarting CF, register the CFX tag in the ColdFusion Administrator
    using the name of the class that implements the CustomTag
    interface.
    Though it is worth noting you can also instantiate java
    classes directly from ColdFusion (ie without using a CFX
    tag).

  • Implementing DOM Interface with existing Java classes

    I had planned on using some tree-like Java classes as a Document Object Model, which would give me access to all sorts of XML and DOM tools like parsers and XSLT transformers. Initially, I thought all that would be neccessary is to implement all the DOM Interfaces in org.w3c.dom and then I would have a set of classes that conformed to DOM Level 1. It was my understanding that interfaces such as DOMImplementation and Document would interface with various XML tools, allowing creation of a class that implements Document and then Document would have its various factory methods that know how to create the various DOM nodes such as Element, Attr, Text, NamedNodeMap, NodeList, etc.
    The problem I'm seeing now is that the JAXP specification (which is what the latest Xerces and Xalan tools conform to) has something called a DocumentBuilder and DocumentBuilderFactory that appear to be necessary to tell the framework what type of class to instantiate that implements the Document DOM interface. Those appear to have a lot of methods that deal with parsing of XML documents and I didn't really want to write or even subclass any existing Parsers in order to get the functionality of traversing and transforming a set of classes that implement the DOM interface.
    Am I missing something here? Is it possible to plug in any (set of classes for) DOMImplementation and get them to work with the various DOM and XML tools out there?
    Is there an easier way to allow parts of an application access to internal data structures but have the more generic tools or APIs, such as XSL transformers, access that same set of classes as a DOM with the generic DOM interface methods?
    Can someone provide me with some guidance here? I'm in the process of finalizing some design on a system and need to know if this is possible or if I need to alter my design.
    Thanks.

    If I understand you correctly, I think I am working on a similar issue. I am unhappy with the methods given by the DOM for retrieving data from the XML file and for building a file. Our software has a bunch of code that uses these classes and it is extremely ugly. My solution was to create a facade on top of the DOM model. Essentially I have some simple classes that store all the pertinent info (for me) about the XML structure. Essentially that is the element or attribute name, its values and in the case of the element, it's children. This makes it easier for me to build and retreive the data. What I then built was a loader class and a builder class. The loader takes an XML file and parses it in using the DOM classes and builds a structure using my classes and returns the root element. The builder takes a root element and creates a DOM object out of it. This frees me of having to code around the DOM classes all over the place and makes it simple to upgrade our XML code if the DOM changes or a better DOM is released. I am using factories to facilitate this and allow me to have loaders for specific types of XML documents so that I can have a class for each which further simplifies the XML related tasks of other developers on my team.

  • How to compile and run a .java file from another java program

    hello,
    can any one tell me how to compile and run a *.java* file from another java program which is not in same directory?

    Well a smarter way of implementing this is by using a solution provided by Java Itself.
    If you are using J2SE 6.0+ there is an in built solution provided along with JDK itself and inorder to go ahead with solution the below are set of API which you;d be using it for compiling Java Programs (Files)
    http://java.sun.com/javase/6/docs/api/javax/tools/package-summary.html
    How do i do that ??
    Check out the below articles which would help you of how to do that
    http://www.ibm.com/developerworks/java/library/j-jcomp/index.html
    http://www.javabeat.net/javabeat/java6/articles/java_6_0_compiler_api_1.php
    http://books.google.com/books?id=WVbpv8SQpkEC&pg=PA155&lpg=PA155&dq=%22javax+tools%22+compiling+java+file&source=web&ots=XOt0siYe-f&sig=HH27ovuwvJgklIf8omTykUmy-eM
    Now once we are done with compilation.In order to run a Specific class all you ought to do is create an object and its specific methods of a specified class included in the CLASSPATH which you can manage it easily by usage little bit reflections.
    Hope that might help :)
    REGARDS,
    RaHuL

  • Just now i started learning ABAP and basically from JAVA background.

    hi,
    Just now i started learning ABAP and basically from JAVA background.Can anyone tell me how to implement(steps) java in sap(from where i have to start).
    regards,
    Venkat.

    Hi Venkat,
         if u know java very well, then u can take up EP. ABAP is also very easy one to read and understand, as ur basically from prgming background.
    To start with go thro the classical abap and then come to abapoo.
    u can find so many link when u search for doc in sdn.
    all the best,
    Regards
    Sathish

  • Drag n Drop between JButton and third party Java object

    Hi!
    I want to implement drag n drop(however it is not drag n drop in its real sense) between JButton(s) placed in a JToolBar and third party Java Object i.e. Netbeans Visual Library API's Scene class that is actually like a Canvas in drawing Apps. The Scene class itself is not a JComponent (it extends directly from java.lang.Object), rather we invoke createView method on the Scene object to get a JComponent that could be used any where(probably in a JScrollPane).
    What i want is that when my user drags a JButton to the Scene's view it appears similarly as something is being dragged But in actaul that JButton should'nt be dragged or dropped Rather when user releases the mouse button to drop the item i could use my custom code to do something(actually add a Widget(a graphical item) to the Scene object).
    How could this be achieved..?
    thanks in advance,
    regards.

    The problem with UNIX and more specially with X is thare wasn't common drag'n'drop interface. Now there is XDND (X Drag'n'drop) protocol but it might not be implemented on each X server or may not be used by each X application.
    I don't know if GNOME use XDND and/or if Java implementations for UNIX support that protocol. However you can check some other projects like:
    http://java-gnome.sourceforge.net/
    http://gnome-gcj.sourceforge.net/
    which provide external bindings of gnome libraries to java.

  • Implementing equals() and hashcode

    Hi,
    I need to implement equals() and hashcode() in a class. I only need to use one class variable in the equals() method; String id.
    I'm having difficulties to understand the examples I've seen - can someone please help me out?
    regards, Puzz

    And I know you said you had a hard time understanding some examples, but I'm not sure which examples you've seen. Here is some recommended reading that I think explains this concept well:
    Sun's Java Tutorial: The equals and hashCode Methods
    Josh Bloch: Effective Java
    JavaWorld: Implementing equals and hashCode
    IBM: Defining hashCode() and equals() effectively and correctly
    JavaPractices: Implementing hashCode
    JavaWorld: override hashcode/equals
    ~

  • Diff was java add in and stand alone java instance

    Hi Guys ,
    What is the diff between  was java add in and stand alone java instance ?
    Thanks
    Sonam

    Hai,
    SCS is nothing but the SAP Central Services, it is AS Java instance of an SAP system containing the enqueue server and the message server.
    JAVA Addin is inserted in exsisting ABAP only instance to have JAVA functionality. JAVA instance is assigned to an ABAP instance. The Internet Communication Manager (ICM) of the ABAP instance starts and stops the associated Java instance as required.
    Netweaver JAVA (Stand alone) vs JAVA Addin:
    Netweaver JAVA Addin installation is a dual installation that consists of Java and ABAP stack. Addin is required when you are implementing SAP XI (Exchange Infrastructure). Stand alone JAVA is required when you implement SAP EP (Enterprise Portal). It is generally not recommended to use dual installation for EP because this will expose the ABAP layer to the public Internet. So the ABAP stack is often used to host SAP ERP ECC (Enterprise Central Component), SAP CRM, SAP SCM, etc.,
    Since the information hosted on ABAP stack is more sensitive in nature you are recommended to install Portal on the Netweaver AS Java server (Stand alone JAVA server).
    By doing this you will be able to fully utilize the system resources for the portal and ensure good performance.
    Regards,
    Yoganand.V

  • Opengl and directx for java or c++ or Java3D

    I am new to the 3D programming and I have many queries and I hope those expect can answer me. Thank you very much.
    I have some experience in writing directx 7.0 in C++. I find that the IDirect3DDevice7 in directx7.0 does not support 256 colors but direct3ddevice in directx5.0 does.
    However, the direct3ddevice in directx5.0 in 16 or 32 bit color performs very strange. Distortion is found in displaying a 3D image.
    1.     Do you have this experience? Does direct3ddevice in directx5.0 not work in 16 or 32 bit colors?
    2.     If I want to write a 3D directx program in C++ that can be work in every resolution, what can I do?
    3.     Can opengl work in every resolution 256 colors, 16, 32 bits?
    4.     Does opengl work in every platform?
    5.     Can I write an opengl program in window platform and run it in Linux without any modification or compilation ?
    6.     Does the opengl runtime different from platform to platform ?
    7.     If I deploy an opengl progam, do I need to deploy the runtime for a particular platform with it.
    8.     Opengl is claimed to be open source. What does it mean ? Can I modify the code of the opengl sdk or runtime and re-complie it and make it my own version of opengl ?
    9.     I find many version of opengl sdk in the web. Some is special to a particular hardware eg. NVIDIA. Some is not bounded to any hardware. What is the different between them ? How can I choose from them ?
    10.     I know that there is directx for java and opengl for java. Is it the so called java 3D ?
    11.     Does opengl or directx together with Java2 become Java 3D ?
    12.     However I cannot find any directx code or directive for importing the directx package in the Java 3D sample code.
    13.     Does the Javax provide the utility for 3D programming by hiding the 3D device or texture surface creation ?
    14.     I find some code segment from MSDN which shows the way to create a directdraw object in an applet. I wonder what is the proper way to use directx or opengl in java since my main goal is to create a directx application that can be worked in the web.
    15.     Lastly, from my understanding, directx is a com api which can be used in every programming languages. Does it imply that with a directx sdk, I can write a directx application in C++, java, or vb ?
    16.     But, I find that the code to do the same task in the three programming languages is very different. The object creation methods, the data structure for directx in the three programming languages is different. Is the same sdk realy used in different programming languages ? The object name for e.g. direct3ddevice is different from vb (Direct3DDevice7) and c++ (IDirect3DDevice7).

    I'm no expert in 3D graphics programming, but I have some experience. I'll try to answer some of your questions.
    2.     If I want to write a 3D directx program in C++ that
    can be work in every resolution, what can I do?I think both DirectX and OpenGL supports any resolution and color depth. It's more a matter of which resolutions your graphics driver supports.
    3.     Can opengl work in every resolution 256 colors, 16,
    32 bits?Yes.
    4.     Does opengl work in every platform?OpenGL is available on many platforms. Look at GL4Java if you want to use OpenGL in Java, it's available on many platforms. Look at: http://www.jausoft.com/gl4java.html
    5.     Can I write an opengl program in window platform
    and run it in Linux without any modification or
    compilation ?Yes, if you write it in Java. In C++ you will need to recompile the app.
    6.     Does the opengl runtime different from platform to
    platform ?No, it's a standard. There are some extensions that are driver dependant, but if you stick to the standard it will run unmodified on all platforms.
    7.     If I deploy an opengl progam, do I need to deploy
    the runtime for a particular platform with it.I don't think OpenGL is available by default on all platforms.
    8.     Opengl is claimed to be open source. What does it
    mean ? Can I modify the code of the opengl sdk or
    runtime and re-complie it and make it my own version
    of opengl ?OpenGL is not open source. OpenGL is a standard, it can't be open source since there is no source code.
    9.     I find many version of opengl sdk in the web. Some
    is special to a particular hardware eg. NVIDIA. Some
    is not bounded to any hardware. What is the different
    between them ? How can I choose from them ?If you have modern graphics card the driver includes support for OpenGL on MS Windows. For Linux you use Mesa I think. See GL4Java homepage for more info.
    10.     I know that there is directx for java and opengl
    for java. Is it the so called java 3D ?GL4Java implements the OpenGL functions in Java. Java3D is a high level API that runs on either OpenGL or DirectX.
    11.     Does opengl or directx together with Java2 become
    Java 3D ?No. The Java3D package is available for download at java.sun.com.
    12.     However I cannot find any directx code or
    directive for importing the directx package in the
    Java 3D sample code.You can't call DirectX directly in Java3D. It hides the underlying layers.
    13.     Does the Javax provide the utility for 3D
    programming by hiding the 3D device or texture surface
    creation ?Java3D is platform independent and hides things like the hardware, drivers etc.
    14.     I find some code segment from MSDN which shows the
    way to create a directdraw object in an applet. I
    wonder what is the proper way to use directx or opengl
    in java since my main goal is to create a directx
    application that can be worked in the web.I dont know if DirectX is available for Java. I recommend that you use OpenGL instead, or Java3D if you want an easy, high level API.
    15.     Lastly, from my understanding, directx is a com
    api which can be used in every programming languages.
    Does it imply that with a directx sdk, I can write a
    directx application in C++, java, or vb ?In C++ and VB, yes. Dont know if there are any Java DirectX bindings available.
    16.     But, I find that the code to do the same task in
    the three programming languages is very different. The
    object creation methods, the data structure for
    directx in the three programming languages is
    different. Is the same sdk realy used in different
    programming languages ? The object name for e.g.
    direct3ddevice is different from vb (Direct3DDevice7)
    and c++ (IDirect3DDevice7).Don't mix programming languages in the same app. Decide if Java or C++ is the right language for you, then use the tools available for the language you choose.
    My recommendation is to go for Java and Java3D if you are inexperienced with 3D graphics programming. Use Java + OpenGL if you know about vertices, textures, transforms etc.

  • Hp photosmart premium wireless C309 can't print after updating to IE 9 and i think java script

     hp photosmart premium wireless C309  can't print after  updating to  IE 9 and i think java script.  I am a realtor working from home and inorder to use the forms it required I update to IE9 and I think java,   this is the link.   http://www.car.org/tools/zipform6/   After doing so my printer does not work.  I tried to go on line and reinstall from a link on line but it did not work.  I don't know what to delete and what to add and how to get the " HP sSolution center" to work again.  the printer was already poor performance from day one.  Always having to unplug and restart and the black ink always runs out too quick.  but right now my concern is just being able to print and scan.  I am in the middle of a deal and can not communicate  with all parties effectively.  please help

    What error messages are you getting?
    What OS are you using?
    How is the printer connected to the computer?
    -------------How do I give Kudos? | How do I mark a post as Solved? --------------------------------------------------------

  • Need manual to implement training and event management

    Hi All
    I'm going to implement Training and event management for my client.Plz help me if u've any kind of manual or any guidelines for me.
    Thanks,
    SKM

    Hi Santosh,
    Best way to check the guidelines is to see help.sap.com.
    From my experience you need to follow the following steps:
    1. Create busness event groups
    2. Create business event types
    3. Create resource types
    4. Create resources
    5. Create external instructors (if any)
    6. Create companies (if any)
    7. Create locations
    8. Manage integration switches (SEMIN rows in T77S0 table)
    For the master data creaton activities above, you can create LSMW to make it possible for mass data upload.
    After your business catalog and all other master data is in place,
    1. Plan business events - PSVP
    2. Create business events wth/without resources - PSV2
    3. Book attendees- PSV1
    As recurring activities:
    1. Firmly book the events.
    2. Cancel events (if needed)
    3. Follow-up events.
    Regards,
    Dilek

  • HT1338 I installed Mac OSX Snow Leopard 10.6.3 And now my Java is not working, what can I do to fix's this?

    I installed Mac OSX Snow Leopard 10.6.3 And now my Java is not working,what can I do to fix's this?

    Run Software Update to get to 10.6.8 and update Java.

  • Can someone pls help me with java on my macbook pro because after i download the mountain lion java has died and i need java to see streaming quotes from stock market

    can someone pls help me with java on my macbook pro because after i download the mountain lion java has died and i need java to see streaming quotes from stock market

    Java is no longer included in Mac OS X by default. If you want Java, you will have to install it.
    However, note that you should think twice before installing Java for such a trivial need as looking at stock market quotes. There are other ways to get that information that don't involve Java, and using Java in your web browser is a HUGE security risk right now. Java has been vulnerable to attack almost constantly for the last year, and has become a very popular, frequently used method for getting malware installed via "drive-by downloads." You really, truly don't want to be using it. See:
    Java is vulnerable… Again?!
    http://java-0day.com

  • BEA / Wily:  Financial Webinar - Achieving Availability, Performance and Control of Java Applications in Financial Services

    Event Date: October 1, 2002 at 11:00 AM Pacific (US), 02:00 PM Eastern (US)
    To register: http://regsvc.placeware.com/?wily-bea1001
    Title: Achieving Availability, Performance and Control of Java Applications
    in Financial Services
    Abstract:
    In today's competitive environment, financial institutions must focus on
    three key business goals:
    a.. Creating a customer-centric enterprise to maximize value to customers
    and increase share of wallet
    b.. Improving transactional efficiency for rapid delivery of the right
    products, services and information to customers and to employees
    c.. Accelerating the decision making process to mitigate risk and improve
    returns.
    BEA and Wily Technology have helped a number of financial services firms
    meet these objectives by delivering high-performance business solutions that
    meet rigorous demands for performance, reliability and scalability.
    On October 1, 2002, Wily Technology and BEA will present a joint Web seminar
    titled "Achieving Availability, Performance and Control of Java Applications
    in Financial Services" with Eric Gudgion, Principal System Architect,
    Technical Solutions Group at BEA and Chris Farrell, Director of Technical
    Marketing at Wily. This Webinar will showcase the many advantages that the
    WebLogic® Enterprise PlatformT and Wily's Introscope® offer financial
    services firms.
    Attendees will learn how WebLogic Server, BEA's unified, simplified and
    extensible solution, provides a robust platform for the development and
    deployment of enterprise Java applications. Some examples of what financial
    institutions can achieve with BEA include Multi-channel Services Delivery,
    Straight-Through Processing, Wealth Management and Cash Management.
    Wily Technology will highlight Introscope's ability to manage financial
    services Java applications by pinpointing component-level performance issues
    in real-time, whether in the application, application server or
    Java-connected back-end systems. Wily's suite of Java application management
    solutions offers a comprehensive platform for achieving 24x7 application
    availability, enhanced performance and better control of IT resources.

    First of all you should check out which products are supported on 64bit :- http://www.oracle.com/technology/products/bi/hyperion-supported-platforms.html
    If you are planning on using windows 64bit EAS then you will have to manually deploy the web application, it cannot be automatically deployed.
    Cheers
    John
    http://john-goodwin.blogspot.com/

Maybe you are looking for

  • Fixed Asset and G/L reconciliation

    Dear All Can anyone help me with how best to reconcile the fixed asset module with the General Ledger. Is there a guideline or process on what reports are best used and how to do this. Many Thanks PRG

  • Printing from call manager

    I like to print the help screens and also print the screen displays while in Call Manager. The network engineer did not recommend this. We tried it anyway - we added a driver and defined a printer but sometimes it would cause the IExplorer to spike t

  • Problem viewing music on phone in ovisuite

    I dont usualy use Ovi Suite for music management as I re-encoded all my mp3 files to a lower bitrate but keep the full size ones in the Windows Music directory. But I deleted a playlist on my phone by mistake and wanted to recreate it so connected my

  • Looking for Ribbon cabble for Seagate HD for my Zen Mi

    Hello, i'm looking for the following spare pieces : the ribbon cable between the seagate HD and my zen micro player. Does anyone have one I'm ready to buy it right now ! :-) Thanks in advance. Franck

  • Garbled messages from application

    Hi We have an externally supplied C++ application that we're trying to use with 10.1.0.2 instant client. When it tries to connect we get 'no message found for e12ac3445ff123'. I am assuming this is to do with the version of the client the app was bui