OID And Java Hash Algorithm Output Differences?

Hi,
Can anyone tell me why I am not able to recreate the OID ldap password hash algorithm? Or can anyone tell me why I get these subtle differences between my Java created message digest and the one that is read directly from the oracle ldap hint password field? They are both based on the same original word "test".
OID Hint Password from ldap ==> {SHA}zrFqbho8VPUOnVvtyUb4c+RWF+k=
Hash created based on input ==> {SHA}zrFqbho8VPUOP1vtyUb4c+RWF+k=
Here is a little background. I am working on developing a custom forgot password feature for my web site using OID 10g R2 and Java. I am able to retrieve the oracle hint password from OID using Java JNDI as the orcladmin. This ldap password is a SHA message digest, or hash, that is base 64 encoded. Since it is a one way algorithm I can not decrypt. So instead I take the clear text password string provided by the user and create a message digest(SHA) and then encode in base 64 using Java 1.4.2 like so;
MessageDigest md = MessageDigest.getInstance("SHA");
md.update(clearTextPassword.getBytes());
String userSuppliedPassword = new String(md.digest());
BASE64Encoder base64encoder = new BASE64Encoder();
String output = "{SHA}" + base64encoder.encode(userSuppliedPassword.getBytes());
By the way, I have been able to work around this issue by performing the compare using JNDI search but was curious why this was happening. Thanks!

Hi
I am having similar issue. I have to save passwords in encrypted form to LDAP. But not working. I am prepending the encrypted password {SHA} so OID should not convert further.
Any help is appreciated
Thanks

Similar Messages

  • Java SE5 and Java EE5 difference

    What is the difference between Java SE5 and Java EE5? Also difference btwn SDK and JDK? I am confused about these basic concepts.
    Thanks
    Geet

    Java Platform, Enterprise Edition is a related specification which includes all of the classes in Java SE, plus a number which are more useful to programs which run on servers as opposed to workstations.
    Java EE includes several API specifications, such as JDBC, RMI, e-mail, JMS, web services, XML, etc, and defines how to coordinate them. Java EE also features some specifications unique to Java EE for components. These include Enterprise JavaBeans, servlets, portlets (following the Java Portlet specification), JavaServer Pages and several web service technologies.

  • What is difference between C# Gzip and Java swing GZIPOutputStream?

    Hi All,
    I have a Java swing tool where i can compress file inputs and we have C# tool.
    I am using GZIPOutputStream to compress the stream .
    I found the difference between C# and Java Gzip compression while a compressing a file (temp.gif ) -
    After Compression of temp.gif file in C# - compressed file size increased
    while in java i found a 2% percentage of compression of data.
    Could you please tell me , can i achieve same output in Java as compared to C# using GZIPOutputStream ?
    Thank a lot in advance.

    797957 wrote:
    Does java provides a better compression than C#?no idea, i don't do c# programming. and, your question is most likely really: "does java default to a higher compression level than c#".
    Btw what is faster compression vs. better compression?meaning, does the code spend more time/effort trying to compress the data (slower but better compression) or less time/effort trying to compress the data (faster but worse compression). most compression algorithms allow you to control this tradeoff depending on whether you care more about cpu time or disk/memory space.

  • Difference between ooabap and java

    eventhough both java and ooabap are oops languages there may be some difference between them as c++ and java in using the oops concepts or may be there is an advantage in using ooabap than java .
                                                            any one pls  reply to the above asked question.
    <REMOVED BY MODERATOR>
    Edited by: rahul nuthi on Feb 26, 2008 1:10 PM
    Edited by: Alvaro Tejada Galindo on Feb 26, 2008 11:19 AM

    hi
    OOPs ABAP uses Classes and Interfaces which uses Methods and events.
    If you have Java skills it is advantage for you.
    There are Local classes as well as Global Classes.
    Local classes we can work in SE38 straight away.
    But mostly it is better to use the Global classes.
    Global Classes or Interfaces are to be created in SE24.
    SAP already given some predefined classes and Interfaces.
    This OOPS concepts very useful for writing BADI's also.
    So first create a class in SE 24.
    Define attributes, Methods for that class.
    Define parameters for that Method.
    You can define event handlers also to handle the messages.
    After creation in each method write the code.
    Methods are similar to ABAP PERFORM -FORM statements.
    After the creation of CLass and methods come to SE38 and create the program.
    In the program create a object type ref to that class and with the help of that Object call the methods of that Class and display the data.
    Example:
    REPORT sapmz_hf_alv_grid .
    Type pool for icons - used in the toolbar
    TYPE-POOLS: icon.
    TABLES: zsflight.
    To allow the declaration of o_event_receiver before the
    lcl_event_receiver class is defined, decale it as deferred in the
    start of the program
    CLASS lcl_event_receiver DEFINITION DEFERRED.
    G L O B A L I N T E R N A L T A B L E S
    *DATA: gi_sflight TYPE STANDARD TABLE OF sflight.
    To include a traffic light and/or color a line the structure of the
    table must include fields for the traffic light and/or the color
    TYPES: BEGIN OF st_sflight.
    INCLUDE STRUCTURE zsflight.
    Field for traffic light
    TYPES: traffic_light TYPE c.
    Field for line color
    types: line_color(4) type c.
    TYPES: END OF st_sflight.
    TYPES: tt_sflight TYPE STANDARD TABLE OF st_sflight.
    DATA: gi_sflight TYPE tt_sflight.
    G L O B A L D A T A
    DATA: ok_code LIKE sy-ucomm,
    Work area for internal table
    g_wa_sflight TYPE st_sflight,
    ALV control: Layout structure
    gs_layout TYPE lvc_s_layo.
    Declare reference variables to the ALV grid and the container
    DATA:
    go_grid TYPE REF TO cl_gui_alv_grid,
    go_custom_container TYPE REF TO cl_gui_custom_container,
    o_event_receiver TYPE REF TO lcl_event_receiver.
    DATA:
    Work area for screen 200
    g_screen200 LIKE zsflight.
    Data for storing information about selected rows in the grid
    DATA:
    Internal table
    gi_index_rows TYPE lvc_t_row,
    Information about 1 row
    g_selected_row LIKE lvc_s_row.
    C L A S S E S
    CLASS lcl_event_receiver DEFINITION.
    PUBLIC SECTION.
    METHODS:
    handle_toolbar FOR EVENT toolbar OF cl_gui_alv_grid
    IMPORTING
    e_object e_interactive,
    handle_user_command FOR EVENT user_command OF cl_gui_alv_grid
    IMPORTING e_ucomm.
    ENDCLASS.
    CLASS lcl_event_receiver IMPLEMENTATION
    CLASS lcl_event_receiver IMPLEMENTATION.
    METHOD handle_toolbar.
    Event handler method for event toolbar.
    CONSTANTS:
    Constants for button type
    c_button_normal TYPE i VALUE 0,
    c_menu_and_default_button TYPE i VALUE 1,
    c_menu TYPE i VALUE 2,
    c_separator TYPE i VALUE 3,
    c_radio_button TYPE i VALUE 4,
    c_checkbox TYPE i VALUE 5,
    c_menu_entry TYPE i VALUE 6.
    DATA:
    ls_toolbar TYPE stb_button.
    Append seperator to the normal toolbar
    CLEAR ls_toolbar.
    MOVE c_separator TO ls_toolbar-butn_type..
    APPEND ls_toolbar TO e_object->mt_toolbar.
    Append a new button that to the toolbar. Use E_OBJECT of
    event toolbar. E_OBJECT is of type CL_ALV_EVENT_TOOLBAR_SET.
    This class has one attribute MT_TOOLBAR which is of table type
    TTB_BUTTON. The structure is STB_BUTTON
    CLEAR ls_toolbar.
    MOVE 'CHANGE' TO ls_toolbar-function.
    MOVE icon_change TO ls_toolbar-icon.
    MOVE 'Change flight' TO ls_toolbar-quickinfo.
    MOVE 'Change' TO ls_toolbar-text.
    MOVE ' ' TO ls_toolbar-disabled.
    APPEND ls_toolbar TO e_object->mt_toolbar.
    ENDMETHOD.
    METHOD handle_user_command.
    Handle own functions defined in the toolbar
    CASE e_ucomm.
    WHEN 'CHANGE'.
    PERFORM change_flight.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDMETHOD.
    ENDCLASS.
    S T A R T - O F - S E L E C T I O N.
    START-OF-SELECTION.
    SET SCREEN '100'.
    *& Module USER_COMMAND_0100 INPUT
    MODULE user_command_0100 INPUT.
    CASE ok_code.
    WHEN 'EXIT'.
    LEAVE TO SCREEN 0.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0100 INPUT
    *& Module STATUS_0100 OUTPUT
    MODULE status_0100 OUTPUT.
    DATA:
    For parameter IS_VARIANT that is sued to set up options for storing
    the grid layout as a variant in method set_table_for_first_display
    l_layout TYPE disvariant,
    Utillity field
    l_lines TYPE i.
    After returning from screen 200 the line that was selected before
    going to screen 200, should be selected again. The table gi_index_rows
    was the output table from the GET_SELECTED_ROWS method in form
    CHANGE_FLIGHT
    DESCRIBE TABLE gi_index_rows LINES l_lines.
    IF l_lines > 0.
    CALL METHOD go_grid->set_selected_rows
    EXPORTING
    it_index_rows = gi_index_rows.
    CALL METHOD cl_gui_cfw=>flush.
    REFRESH gi_index_rows.
    ENDIF.
    Read data and create objects
    IF go_custom_container IS INITIAL.
    Read data from datbase table
    PERFORM get_data.
    Create objects for container and ALV grid
    CREATE OBJECT go_custom_container
    EXPORTING container_name = 'ALV_CONTAINER'.
    CREATE OBJECT go_grid
    EXPORTING
    i_parent = go_custom_container.
    Create object for event_receiver class
    and set handlers
    CREATE OBJECT o_event_receiver.
    SET HANDLER o_event_receiver->handle_user_command FOR go_grid.
    SET HANDLER o_event_receiver->handle_toolbar FOR go_grid.
    Layout (Variant) for ALV grid
    l_layout-report = sy-repid. "Layout fo report
    Setup the grid layout using a variable of structure lvc_s_layo
    Set grid title
    gs_layout-grid_title = 'Flights'.
    Selection mode - Single row without buttons
    (This is the default mode
    gs_layout-sel_mode = 'B'.
    Name of the exception field (Traffic light field) and the color
    field + set the exception and color field of the table
    gs_layout-excp_fname = 'TRAFFIC_LIGHT'.
    gs_layout-info_fname = 'LINE_COLOR'.
    LOOP AT gi_sflight INTO g_wa_sflight.
    IF g_wa_sflight-paymentsum < 100000.
    Value of traffic light field
    g_wa_sflight-traffic_light = '1'.
    Value of color field:
    C = Color, 6=Color 1=Intesified on, 0: Inverse display off
    g_wa_sflight-line_color = 'C610'.
    ELSEIF g_wa_sflight-paymentsum => 100000 AND
    g_wa_sflight-paymentsum < 1000000.
    g_wa_sflight-traffic_light = '2'.
    ELSE.
    g_wa_sflight-traffic_light = '3'.
    ENDIF.
    MODIFY gi_sflight FROM g_wa_sflight.
    ENDLOOP.
    Grid setup for first display
    CALL METHOD go_grid->set_table_for_first_display
    EXPORTING i_structure_name = 'SFLIGHT'
    is_variant = l_layout
    i_save = 'A'
    is_layout = gs_layout
    CHANGING it_outtab = gi_sflight.
    End of grid setup
    Raise event toolbar to show the modified toolbar
    CALL METHOD go_grid->set_toolbar_interactive.
    Set focus to the grid. This is not necessary in this
    example as there is only one control on the screen
    CALL METHOD cl_gui_control=>set_focus EXPORTING control = go_grid.
    ENDIF.
    ENDMODULE. " STATUS_0100 OUTPUT
    *& Module USER_COMMAND_0200 INPUT
    MODULE user_command_0200 INPUT.
    CASE ok_code.
    WHEN 'EXIT200'.
    LEAVE TO SCREEN 100.
    WHEN'SAVE'.
    PERFORM save_changes.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0200 INPUT
    *& Form get_data
    FORM get_data.
    Read data from table SFLIGHT
    SELECT *
    FROM zsflight
    INTO TABLE gi_sflight.
    ENDFORM. " load_data_into_grid
    *& Form change_flight
    Reads the contents of the selected row in the grid, ans transfers
    the data to screen 200, where it can be changed and saved.
    FORM change_flight.
    DATA:l_lines TYPE i.
    REFRESH gi_index_rows.
    CLEAR g_selected_row.
    Read index of selected rows
    CALL METHOD go_grid->get_selected_rows
    IMPORTING
    et_index_rows = gi_index_rows.
    Check if any row are selected at all. If not
    table gi_index_rows will be empty
    DESCRIBE TABLE gi_index_rows LINES l_lines.
    IF l_lines = 0.
    CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
    EXPORTING
    textline1 = 'You must choose a line'.
    EXIT.
    ENDIF.
    Read indexes of selected rows. In this example only one
    row can be selected as we are using gs_layout-sel_mode = 'B',
    so it is only ncessary to read the first entry in
    table gi_index_rows
    LOOP AT gi_index_rows INTO g_selected_row.
    IF sy-tabix = 1.
    READ TABLE gi_sflight INDEX g_selected_row-index INTO g_wa_sflight.
    ENDIF.
    ENDLOOP.
    Transfer data from the selected row to screenm 200 and show
    screen 200
    CLEAR g_screen200.
    MOVE-CORRESPONDING g_wa_sflight TO g_screen200.
    LEAVE TO SCREEN '200'.
    ENDFORM. " change_flight
    *& Form save_changes
    Changes made in screen 200 are written to the datbase table
    zsflight, and to the grid table gi_sflight, and the grid is
    updated with method refresh_table_display to display the changes
    FORM save_changes.
    DATA: l_traffic_light TYPE c.
    Update traffic light field
    Update database table
    MODIFY zsflight FROM g_screen200.
    Update grid table , traffic light field and color field.
    Note that it is necessary to use structure g_wa_sflight
    for the update, as the screen structure does not have a
    traffic light field
    MOVE-CORRESPONDING g_screen200 TO g_wa_sflight.
    IF g_wa_sflight-paymentsum < 100000.
    g_wa_sflight-traffic_light = '1'.
    C = Color, 6=Color 1=Intesified on, 0: Inverse display off
    g_wa_sflight-line_color = 'C610'.
    ELSEIF g_wa_sflight-paymentsum => 100000 AND
    g_wa_sflight-paymentsum < 1000000.
    g_wa_sflight-traffic_light = '2'.
    clear g_wa_sflight-line_color.
    ELSE.
    g_wa_sflight-traffic_light = '3'.
    clear g_wa_sflight-line_color.
    ENDIF.
    MODIFY gi_sflight INDEX g_selected_row-index FROM g_wa_sflight.
    Refresh grid
    CALL METHOD go_grid->refresh_table_display.
    CALL METHOD cl_gui_cfw=>flush.
    LEAVE TO SCREEN '100'.
    ENDFORM. " save_changes
    chk this blog
    /people/vijaybabu.dudla/blog/2006/07/21/topofpage-in-alv-using-clguialvgrid
    /message/4447073#4447073 [original link is broken]
    Difference between ABAP an OOABAP
    http://en.wikipedia.org/wiki/Comparison_of_ABAP_and_Java
    hope it will help you
    regards
    sreelatha gullapalli

  • Whats is difference between Java JRE  and  Java SDK

    Hi,
    what is the difference between Java JRE and Java SDK...
    i think both of them have the same set of files to be installed...
    I am not able to understand where they differ

    The JRE (Java runtime Environment) contains just the stuff necessary to run Java and the SDK (System Development Kit) contains the extra stuff necessary (and also helpful) to develop in Java.

  • Do I need Java 8 or should i disable it? What happens if i disable it? And what is the difference between Java and Java Runtime?

    Do I need Java 8 or should I disable it? What happens if i disable it? And what is the difference between Java and Java Runtime?

    There's no difference. They're both runtime plug-ins (they run when an app calls for Java functions).
    You only need Java if you either have Java apps on your Mac that won't run without having it installed, or you use trusted web sites that require Java to function (getting fewer and far between). Otherwise, you have no need for it at all.

  • What're the differences between JSP, Java Script, and Java Applet?

    I am confused by the concepts: JSP (Java Server Page), Java Script, and Java Applet? What are their main differences?

    I don't know about differences, but one of their main similarities is that each of them has a page in Wikipedia.
    JSP
    JavaScript
    [Java applet|http://en.wikipedia.org/wiki/Java_applet]
    There. That should give you enough information.

  • Differences between OID and OUD

    Hello gurus,
    What are the differences between OID and OUD.
    Why Oracle release two LDAP directories. Please let me know.

    These two are two LDAP directories.
    Where OID is database dependent and OUD is not.

  • What's the difference between using java directly in JSP and java bean

    What is the difference if I use java code directly in JSP or use java bean in JSP?
    Which class to use for receiving the passed parameter from html or java script? Any difference for java code and java bean in the way receiving the passed data?
    How can I pass string from jsp to html or java script?

    1 Cleaner pages
    2 you have to write the class and use set and get methods
    3 What do you mean when saying passing string from jsp to html??, do you mean the value you can use <%=variablename%>

  • Difference between AS Java and Java Add-in

    Hi Guys
    Can anybody explain me the exact difference between AS Java and Java Add-in? How can I identify a SAP ABAP system is installed with Java Add-in or AS java?
    Regards
    Dharmendra

    Hi,
    >and if usage is ECC/CRM etc then you go for dual stack installation.
    Wrong ! The official SAP advice is now to use dual stack only for the systems where it is not possible to do otherwise : PI and SOLMAN. Check the new ERP master guide.
    Personnally I would advice strongly to avoid dual stack systems for ECC/CRM or BI.
    We have a dual stack BI system (because at the time, SAP adviced it) but 2 years later we regret it a lot.
    Dual stack system are a mess to manage, administrate and patch.
    This is exactly what I call a "false good idea" !
    Regards,
    Olivier

  • Difference in event handling between Java and Java API

    could anyone list the differences between Java and java-API in event handling??
    thanks,
    cheers,
    Hiru

    the event handling mechanisms in java language
    features and API (java Application Programming
    Features)features .no library can work without a
    language and no language has event handling built in.
    I am trying to compare and contrast the event
    handling mechanisms in the language and library
    combinations such as java/ java API.
    all contributions are welcome!
    thanks
    cheersSorry, I'm still not getting it. I know what Java is, and I know what I think of when I hear API. (Application Programming Interface.) The API is the aggregation of all the classes and methods you can call in Java. If we agree on that, then the event handling mechanisms in Java and its API are one and the same.
    So what do you want to know?
    %

  • ACE20 and hashing algorithm

    I have a secure website behind an Cisco ACE20 using A2(3.2). Everything is working great. Only that now I need to renew my certificate. When creating the CSR and sending it to my CA I get this warning:
    "Alert: Your CSR has been signed using the MD5 hashing algorithm. While the MD5 hashing algorithm is not optimal it will not prevent you from using this CSR to enroll for your SSL certificate. VeriSign best practices recommend that you use a different hashing algorithm for the signature. CSR Information"
    Anybody know if it is possible to use SHA instead of MD5 or what can I do in this case?

    I dont think you can chnage the signing method for CSRs on the ACE directly. But i would use something like OpenSSL to generate the CSR for SHA.
    http://gnuwin32.sourceforge.net/packages/openssl.htm
    openssl req -out c:\CSR.csr -new -newkey rsa:2048 -nodes -keyout c:\privateKey.key -sha1
    The above will load a wizard format questionare for your CSR parameters similar to the ACE.
    You can then upload your key, and cert when you get it to the ACE afterwards.
    ==========================
    http://www.rConfig.com 
    A free, open source network device configuration management tool, customizable to your needs!
    - Always vote on an answer if you found it helpful

  • Difference between Page cache and cahelist in mdb output

    Hello
    When perfoming a "mdb -k" dee command ::memstat a got an output which summerize memory allocation and I cannot make the difference between the "page cache" and the "Free(cachelist)" rows. Both are used by file data by I can't make any difference.
    Does anyone know which differs between these two counter?
    Thank you

    Hi,
    Query Precalculation
    The distribution type Precalculated Value Set allows you to fill variables of the type precalculated value sets with values for characteristic values in the background. The precalculated value sets are then available as variable values in BEx queries.
    The following cases are typical examples of where the execution of precalculated value sets in the background is used:
    ●     When analyzing target groups, because you can specify a fixed value
    ●     When complex selections are involved such as with top N queries, used to greatly improve query performance
    ●     Instead of variables that are filled from a query event
    http://help.sap.com/saphelp_nw70ehp1core/helpdata/en/2a/b37f425b595551e10000000a1550b0/frameset.htm
    Filling OLAP Cache
    The distribution type Fill OLAP Cache allows you to precalculate queries and to fill the OLAP cache with the generated data.
    If the users call Web Applications, queries, reports or workbooks that are based on this data, the access time is significantly reduced and the workload on the application server is considerably less.
    http://help.sap.com/saphelp_nw70ehp1core/helpdata/en/2a/b37f425b595551e10000000a1550b0/frameset.htm
    Hope this helps
    Regards
    Snehith

  • Difference between java.exe and java.dll

    can some one tell me the difference between java.exe under bin directory of jdk and java.dll under bin directory of jre under jdk. and how to determine jre the application is using.How to locate istalled jres in windows registry

    can some one tell me the difference between
    java.exe under bin directory of jdk and
    java.dll under bin directory of jre under jdk.java.dll is the library containing the Java Virtual Machine. java.exe is the
    program you execute to run Java. It uses java.dll. The java.dll can also be used
    to invoke Java classes from other languages using the Java Native Interface (JNI), see
    http://java.sun.com/j2se/1.4.2/docs/guide/jni/index.html for more information.
    Steve Dever

  • Performance difference between java.beans.Expression and Java Reflection

    What is the Performance difference between using java.beans.Expression class and Java Reflection classes like Class,Method ??

    negligible

Maybe you are looking for