Regarding small help

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

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

Similar Messages

  • Regarding small help in update stmt

    Hi,
    i am updating 47 months data in PL/SQL block.
    when i am trying to execute it is getting " invalid relation operator at line 30"
    Here i am giving my pl/sql block.can you please find where is the error
    DECLARE
    Type reco_ref is REF CURSOR;
    reco_cur reco_ref;
    ac_no master.acct_nbr%type;
    m_dt master.mdate%type;
    d_rec master.rec%type;
    d_damt master.dlamt%type;
    dbal master.balamt%type;
    v_m_dt VARCHAR2(8);
    m_dt1 DATE:=to_date(substr('_20021031',2),'yyyymmdd');
    err_cd NUMBER;
    err_text VARCHAR2(200);
    stmt_str VARCHAR2(4000);
    stmt_str1 VARCHAR2(10000);
    BEGIN
    for v_ctr in 1 .. 47
    loop
    v_m_dt := to_char(m_dt1, 'YYYYMMDD');
    stmt_str:= 'SELECT acct_nbr,mdate,rec,dlamt,balamt FROM master partition (p'||v_mis_dt||') where rec < 0';
    open reco_cur for stmt_str;
    LOOP
    fetch reco_cur into ac_no,m_dt,d_rec,d_damt,dbal;
    EXIT WHEN reco_cur%NOTFOUND;
    stmt_str1:= 'update master partition (p'||v_m_dt ||') set stage =';
    stmt_str1:= stmt_str1 || ' (case when :d_damt>0 and :dbal>0 and (:d_damt/:dbal)<0.2 then ''10%''';
    stmt_str1:= stmt_str1 || ' when :d_damt>0 and :dbal>0 and (:d_damt/:dbal)>= 0.2 and (:d_damt/:dbal) < 1 then ''50%''';
    stmt_str1:= stmt_str1 || ' when :d_damt>0 and :dbal>0 and (:d_damt/:dbal) =1 then ''100%''';
    stmt_str1:= stmt_str1 || ' when nvl(:d_damt,0) =0 and nvl(:dbal,0) =0 then ''100%'' end)';
    stmt_str1:= stmt_str1 || ' where acct_nbr=:ac_no and mdate=:m_dt';
    execute immediate stmt_str1 using d_damt,dbal,d_damt,dbal,
    d_damt,dbal,d_damt,dbal,d_damt,dbal,
    d_damt,dbal,d_damt,dbal,
    d_damt,dbal,ac_no,m_dt;
    END LOOP;
    COMMIT;
    insert into err values(stmt_str1);
    commit;
    m_dt1:= add_months(m_dt1, 1);
    end loop;
    END;
    Thanks in advance

    Not sure which line no is 30
    looks like error with spaces
    stmt_str1:= 'update master partition (p'||v_m_dt ||') set stage =';
    stmt_str1:= stmt_str1 || ' (case when :d_damt>0 and :dbal>0 and (:d_damt/:dbal)<0.2 then ''10%''';
    stmt_str1:= stmt_str1 || ' when :d_damt>0 and :dbal>0 and (:d_damt/:dbal)>= 0.2 and (:d_damt/:dbal) < 1 then ''50%''';
    stmt_str1:= stmt_str1 || ' when :d_damt>0 and :dbal>0 and (:d_damt/:dbal) =1 then ''100%''';
    stmt_str1:= stmt_str1 || ' when nvl(:d_damt,0) =0 and nvl(:dbal,0) =0 then ''100%'' end)';
    stmt_str1:= stmt_str1 || ' where acct_nbr=:ac_no and mdate=:m_dt';
    try to put spaces when you concate string, may be it it joining to gether.
    Also print stmt_str1 just before execute immediate so you will see any error in the update statement.
    If you can not find please post that here with error, so someone can help

  • Need small help

    Hi,
    I need small help in sql*loader.I get data-files which has a particular identified on the 1st record( header ), based on which I've to load a constant for the 1st column of every row. How do I set in the control file.
    Appreciate if someone can give me directions on this.
    Thanks in advance,

    Hi again!
    I hope that a little shell script will do the thing for you.
    1.) Create the following BASH-Script
    #!/bin/bash
    export CUSTNO=""
    export CUSTNO=$(awk -F"," '{print NR " " $3}' datafile.csv | grep 1 | cut -d" " -f2)
    sed -i 's/#x#/'$CUSTNO'/g' controlfile.datI've use datafile.csv as the name of the datafile to load and controlfile.dat as the name of your controlfile. Please change this to fit your needs.
    This script looks for the occurrence of your constant value and stores this value in the variable CUSTNO. Then it look for a string #x# in your controlfile and changes #x# to the value of CUSTNO.
    So in your controlfile there should be a line for custno like that:
    custno                     CONSTANT '#x#'This line will be replace in your example to:
    custno                     CONSTANT '35642'To get this to work I assume that:
    1.) Your constant value is always at the third position in the header of your datafile.
    2.) You've made the change with #x# in your controlfile.
    I hope that this is really usefull to you.
    Best Regards
    Florian W.

  • Hello...i would ask small help i bought a iphone on a local cellshop my unit is iphone 4 and version 7.1 (11D169) and the serial Number 7T103YZ6A4S i am wondering if is original or fake.

    hello...i would ask small help i bought a iphone on a local cellshop my unit is iphone 4 and version 7.1 (11D169) and the serial Number 7T103YZ6A4S i am wondering if is original or fake.

    https://selfsolve.apple.com/agreementWarrantyDynamic.do

  • Help need small help

    ferst this is my pc
    4.09.00.0904 (DirectX 9.0c) ante-HA0X2NT8F0  : CPU الـ Intel Pentium 4 530, 3033 MHz (15 x 202) MSI 848P Neo-V (MS-6788) (5 PCI, 1 AGP, 2 DDR DIMM, Audio)  Intel Breeds Hill i848P ram512 mb(DDR SDRAM) BIOS نوع الـ AMI (11/29/04) Communications Port (COM1) ECP Printer Port (LPT1) RADEON 9250 - Secondary (128 mb) RADEON 9250 (128 mb) ATI Radeon 9250 (RV280) Plug and Play Monitor [NoDB] (105169121) : sound cart Intel 82801EB ICH5 - AC'97 Audio Controller
     : IDE  Standard Dual Channel PCI IDE Controller Floppy disk drive HDS728080PLAT20 (قب 80, 7200 RPM, Ultra-ATA/133)   CD-ROM Drive SMART
    now
    1-my pc restart it self after 4 or 5 h....
    no cbu hot
    no fan error cut i test all
    2-i wanna get update all driver
    i try with the msi brogram and that brogram give me an old v. :((
    3-is my pc (top)(good)(strong) if not i will buy new msi one only tell me
    waiting

    when take look thare i see 12v_____
    euer-power tx 12v
    pl-350 8a 5a max 200w (isthat good )?
    hi Din
    let me ask how i can do this ?(memtest )????
    pls i wanna small help and i wanna know >is my pc good or bad cuz it cust me mush
    and all my pc from MSI !.
    HI Ralphdb
    (((Do you know what temp your Cpu is running)))) no i dont know that i am not professional  in pc hard..so pls be soft with me and explain  ...

  • Small help in SQl regarding the distinct function

    could some one tell me how to get a distinct column rows from a table ..
    select distinct(xyz), sales from dept
    which is giving the duplicate rows for the column xyz...
    could some one give me the right syntex for this
    Thanks in advance ..

    Thanks for this... But i am just wondering why distinct(xyz) is not giving the distinct values for the column xyz is there any change in the sql ...which i need to do

  • Regarding Search help on selection-screen field

    Hi there,
    I am working on custom tables.
    I have a requirement to maintain search pattern on a selection-screen field.
    selection-screen parameter: p_name which is company name filed from Z table.
    By giving a string like Holl* and by  pressing F4 on the field p_name it has to popup a dialogbox having list of company names starting with Holl.
    Thanks in advance.
    -Tulasi

    Hi
    Go through the link given below :
    How to create a search help for my own fields in selection screen
    F4 search help on report selection screen
    also try :
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    DDIC_STRUCTURE = ' '
    RETFIELD = 'VKORG'
    PVALKEY = ' '
    DYNPPROG = SY-REPID
    DYNPNR = SY-DYNNR
    DYNPROFIELD = 'P_VKORG'
    STEPL = 0
    WINDOW_TITLE =
    VALUE = ' '
    VALUE_ORG = 'C'
    TABLES
    VALUE_TAB = T_TABLE1
    FIELD_TAB = field_tab
    RETURN_TAB = RET_TAB
    DYNPFLD_MAPPING = DYN_TAB
    EXCEPTIONS
    PARAMETER_ERROR = 1
    NO_VALUES_FOUND = 2
    OTHERS = 3
    With Regards
    Nikunj shah

  • Regarding small issue

    Hi,
    i have a simple select stmt with where condition,when i execute this query it is taking too much time what are the step i have to take and how can i avoid this time consumption.please help me regarding this issue

    Take a look at this chapter in Oracle Documentation: Optimizing SQL Statements.
    C.

  • Regarding Search Help

    Hi Experts,
    We are having one Customised Transaction code for Project management and when i select Sales Employee and enter  the pernr , it will display all the sales order under him, but when i am not searching through Pernr Instead am pressing F4 where i can see Last name and First Name under F4 Help and I am giving some name 'FIRST NAME = LIEW' and press enter it showing an error as 'No values found for the selection' though his record existing in View M_PREMN, here the search help used is PREMN, How can we check wheteher this Entry has been maintained under PREMN?
    Please provide your Valuable Suggestions.
    Thanks,
    Sailaja.

    Did you check authorization failures thru [SU53|http://help.sap.com/saphelp_nw70ehp1/Helpdata/EN/52/6716b3439b11d1896f0000e8322d00/frameset.htm] ?
    (Be aware there is an exit on this search help for lowercase and authority-checks)
    Regards,
    Raymond

  • Regarding Search Help Exit

    I am having a problem in Search help exit.
    Currently we have a search help “Z_srchlp”. In the Selection method of this search help we have a Help view “z_view”.
    In this view we have a join on Tables KNA1 and KNVV. But now the requirement is to fetch some fields(STR_SUPPL1 and STR_SUPPL2) from ADRC table also. I have to write a Search help Exit for that.
    The search help is on “SHIP-TO PARTY” in VA01. In the Output I need to Display the fields (STR_SUPPL1 and STR_SUPPL2) from ADRC based on adressnumber i.e., ADDRNUMBER in addition to what we are displaying currently.
    Please let me know How can I achieve it. It will be great help if u can send me the Code as it is very urgent.

    Hi,
    take a look to the search help F4IF_SHLP_EXIT_CUSTOMER with SE37.
    Regards
    Nicole

  • Regarding F4 help in Module pool Programming

    Hi folks,
          I have created a Screen in Module pool. I have to attach a F4 help for a field. I did that using the Function Module 'F4IF_INT_TABLE_VALUE_REQUEST'. Its working fine, but the when i click the value in the window, correct field value is not coming to the screen field. I have to get the value of first field in that window, but the value of the last field is coming to the screen. I have cheked the return table in debugging. It getting the value of last field, but not the first field. I have given the correct field value in the retfield parameter. Can any body suggest me why its not coming..
                                  Thanks and Regards,
                                  Shyam.

    Hi Ramachander,
               I have already passed 'S' to value_org.
    Please find my source code below.
    MODULE set_hodf4 INPUT.
      MOVE 'IT_HODF4-DEPTID' TO iretfield.
      REFRESH it_hodf4.
      SELECT DISTINCT deptid
                      bukrs
                      werks FROM zmm_ktph_hodmail INTO TABLE it_hodf4.
      DESCRIBE TABLE it_hodf4 LINES my-tfill.
      CASE my-tfill.
        WHEN '0'.
    * No & entries found.
          MESSAGE i005.
        WHEN OTHERS. "Get F4 help
          CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
            EXPORTING
    *    DDIC_STRUCTURE              = ' '
              retfield               = iretfield
    *   DYNPPROG               = ' '
    *   DYNPNR                 = ' '
    *   DYNPROFIELD            = ' '
             window_title           = c_hod
             value_org              = 'S'
             display                = 'F'
    * IMPORTING
    *   USER_RESET             =
            TABLES
             value_tab              = it_hodf4
             return_tab             = f4_hod
           EXCEPTIONS
             parameter_error        = 1
             no_values_found        = 2
             OTHERS                 = 3
          IF NOT f4_hod[] IS INITIAL.
            MOVE f4_hod-fieldval TO zmm_ktph_hodmail-deptid.
          ENDIF.
      ENDCASE.
    ENDMODULE.                 " set_HODf4  INPUT
    Thanks,
    Shyam.
    Code Formatted by: Alvaro Tejada Galindo on Dec 26, 2008 10:33 AM

  • Regarding search help for a attribute

    Hi All,
    I have an ALV, there is a hyperlink for one field, which opens up another Popup for ALV as component usage.
    I have one Search help for a field in this popup.
    When I open this popup for first time in that session, F4 for the SH, the value is not getting populated  in that field.
    When I close the popup and open it again, next time the value which I select is getting populated in that field.
    Don't know why this happens.
    Like OVS, can we have F4 help event custom one for SH so that I can triiger it for first time.
    What is the event that gets triggered upon F4 selection of SH.
    Appreciate your replies.
    My server details are as below -
    EHP 4 for SAP ERP 6.0 /7.0
    WEBCUIF 700 0001 SAPK-70001INWEBCUIF SAP WEBCUIF 700
    SAP_ABA 701 0002 SAPKA70102 Cross-Application Component
    Does Service pack has raised these issues.
    Regards,
    Lekha.
    Edited by: Lekha on Aug 11, 2009 6:06 PM

    Resolved by myself.

  • Query regarding F4 Help

    Hi Experts,
    I need your help in solving a query about F4 help. I would like to know whether it is possible to return more than one column value from a F4 help. I am working on a scenario where, consider i have a table control with 3 columns. I have F4 helps for two columns. The third column which does not have the F4 help is the primary key and the two columns which have F4 help has repeated values. Consider the following values in the F4 help internal table.
    ColumnA  ColumnB  ColumnC
    1              01            10.09.2009
    2              01            10.09.2009
    3              01            10.09.2009
    Now consider the user selects first row '10.09.2009' in ColumnC and selects '01' from first row columnB from F4 help. I need to populate '1' in columnA of table control.  For this i am using read statement in PBO of my screen. But the read statement fails since ColumnB and ColumnC have repeated values. Kindly provide a solution to fix this problem. Is it possible to get the row id of the row selected by the user from F4 help? I am using the Fm F4IF_INT_TABLE_VALUE_REQUEST. This Fm returns a return_tab. The return_tab has a field record_pos which is 001 always. So it is of no use. Pls help me with a proper suggestion.
    Regards
    Rohan

    hi
    if u want an f4 help and get the other values in the row u need to write the code in process on values request.
    in PVR
    GET CURSOR LINE LINE.
      IF TC-TOP_LINE > 1.
        LINE = LINE + ( TC-TOP_LINE - 1 ).
      ENDIF.
    read table itab index line.
    in that itab u will get the values .

  • Regarding table help MM43 : jigar p

    dear all...
    can any body tell me the table name for trasaction MM43 (display article).
    Actually in the screen we can find one tab called 'Chars' which has three text fields say REPERTOIRE , ARTIST AND SHIRT SIZE.  Can u tell me the exact table whr i can get the relation between heade article no. and these fields mentioned above...
    pls help
    regds
    jigar
                    I

    Hi,
    Use the following :
    Select lgort from <Table name> into IT_HELP2 where <specify the criteria>.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    RETFIELD = P_FIELD
    DYNPPROG = SY-CPROG
    DYNPNR = SY-DYNNR
    DYNPROFIELD = SPACE
    WINDOW_TITLE = 'storage location'
    VALUE_ORG = 'S'
    TABLES
    VALUE_TAB = IT_HELP2
    RETURN_TAB = L_IT_DDSHRETVAL
    EXCEPTIONS
    PARAMETER_ERROR = 1
    NO_VALUES_FOUND = 2
    OTHERS = 3.
    Best regards,
    Prashant

  • Hi Regarding F1 help

    Hi everybody,
    I want to know the function module to get F1 help for  parameter or select options
    Thanks in Advance,
    [email protected]

    Hi Siddi Vinesh,
    No need of F1 help... To get values: If you refer select-options for dictionary elements on pressing F4, it will come by default.  Other wise you can use Fm F4IF_FIELD_VALUE_REQUEST.
    To get help on select options... put cursor on that and press F1 and then F9.
    Reward If Helpful.
    Regards
    Sasidhar Reddy Matli.
    null
    Message was edited by:
            Sasidhar Reddy Matli

Maybe you are looking for

  • My new iPad mini has lost sound

    I purchased an iPad mini a few weeks ago and the sound was working no problem. All of a sudden it has stopped in apps and music. Checked mute and done a reset but neither have worked?

  • ITunes asks me to set it up when I open it

    More and more frequently, iTunes asks me to set up the program when I try to open it, even though it has been running on my computer for months. It usually asks me if I want to add all MP3 files etc and generally set up the program. I then have to go

  • Photo booth only records partial Video no matter how long it is...Help!!

    ok so i wanted to make a funny video to send to my friend. I turned on Photo booth, chose the video option, and hit record. I proceeded to completely embarrass myself on camera for about 5 mins, and i clicked stop. When it stopped, only like the 1st

  • N8 how do I connect to get a 3G connection?

    Only got my Nokia N8 yesterday, so still learning and fiddling with it! how do I get it to connect to a 3G reception? any ideas?

  • Help! Just upgraded to newest version,  and all my playlists gone

    Hi there, I wonder whether anyone might be able to help. I've just upgraded to the latest version of itunes and all my playlists have gone. The music, it seems is all intact, but not in the playlists. This is hours of work! Is there anything I can do