How to display an encrypted Text

I am using TDES to encrypt a plain text using the command:
Cipher c = Cipher.getInstance(this.txtAlgorithm.getText().toString());
c.init(Cipher.ENCRYPT_MODE,sKey);
byte[] tmpcipherTest = this.txtOriginalText.getText().toString().getBytes();
byte[] cipherText = c.doFinal(tmpcipherTest);
The encrypted text is put in cipherText which is an array of byte. However, when I want to display the cipher using cipherText.toString(); the function just give me something wrong that I cannot use that String to put back to the decipher routine.
When I add a watch on the cipherText, it gives out some item in the array as a negative value. So is there anything wrong? But if I just put the cipherText in byte form back to the decipher function, it gives back the original text (in byte form).
Can any on help?

cipherText is an array, and arrays use the default toString method, which shows the class name and hash code.
I have no idea how the encryption you're library works, but it's not surprising that it might put negative values in the byte array.
What do you want to do with the cipherText exactly? If it's decryptable, it's usable. Are you trying to transmit it over a connection of some kind, or print it to text so it can be used as some kind of security token, or something?

Similar Messages

  • How to Display  'purchase order text' in MM03 using report program

    Hi Friends,
    Can anybody suggest me how to display 'purchase order text' in MM03 using report program.
    'Purchase order text' tab displays purchase long text of particular material .
    I coded as:
          SET PARAMETER ID 'MXX' FIELD 'E'.
          SET PARAMETER ID 'MAT' FIELD k_final-matnr.
          SET PARAMETER ID 'WRK' FIELD k_final-werks.
          CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
    It displays Purchasing tab other than Purchase Order Text tab of MM03.
    Please suggest me how can i solve this.
    Is there any parameter id to set values for Purchase Order text tab

    >
    Madhu Mano Chitra wrote:
    > I want how to navigate to MM03 'Purchase Order text'  tab/ view using ABAP code.
    > could any suggest me
    You can call a transaction and pass it a BDC table that tells it where you want it to go.  You have to work out for yourself what to put into the BDC table.  The code below works for tcode CATSSHOW.
    DATA: bdcdata_wa  TYPE bdcdata,
          bdcdata_tab TYPE TABLE OF bdcdata.
    DATA opt TYPE ctu_params.
       CLEAR bdcdata_wa.
        bdcdata_wa-program  = 'CATSSHOW'.
        bdcdata_wa-dynpro   = '1000'.
        bdcdata_wa-dynbegin = 'X'.
        APPEND bdcdata_wa TO bdcdata_tab.
        CLEAR bdcdata_wa.
        bdcdata_wa-fnam = 'SO_STATU-LOW'.
        bdcdata_wa-fval = '20'.
        APPEND bdcdata_wa TO bdcdata_tab.
        CLEAR bdcdata_wa.
        bdcdata_wa-fnam = 'ANDZEIT'.
        bdcdata_wa-fval = SPACE.
        APPEND bdcdata_wa TO bdcdata_tab.
        CLEAR bdcdata_wa.
        bdcdata_wa-fnam = 'PAST'.
        bdcdata_wa-fval = 'X'.
        APPEND bdcdata_wa TO bdcdata_tab.
        IF p_selscr = SPACE.
           CLEAR bdcdata_wa.
           bdcdata_wa-fnam = 'BDC_OKCODE'.
           bdcdata_wa-fval = '=ONLI'.
           APPEND bdcdata_wa TO bdcdata_tab.
        ENDIF.
        opt-dismode = 'E'.
        opt-defsize = 'X'.
    CALL TRANSACTION 'CAPP' USING bdcdata_tab OPTIONS FROM opt.

  • Smartforms,How to display different standard Text in a Text element.

    In smartform,if I want to according to the different conditions,display one of the serveral different standard Text objects which all  maintained in SO10 in a same text element,how to do it?
    if i put them in serval text elements, each condition only display the corresponding text element,but the text content can not display in the same position.
    Is there anyone can tell me?
    thanks.

    use Alternative to control it no problem
    for example you want to display the different SO10 to same position TEMPLATE's row 1 col2
    TEMPLATE1
    Alternative case1
    YES
    INCLUDE TEXT1(display SO10) [set output option line1 column2]
    NO
    Alternative case2
    YES
    INCLUDE TEXT2(display SO10) [set output option line1 column2]
    NO
    Alternative case3
    every case your SO10's text is always display at line2 column2
    just try to test it ,you can know

  • How to display HTML formatted text in the field with Item Style: Raw Text

    How can I display HTML formatted text in the field with Item Style: Raw Text.
    Currently the Item Style is Raw Text, but the text is being displayed along with HTML tags without formatting.
    Regards

    Hi,
    Use Item Style formattedText.
    Regards,
    Gyan

  • BB Bold 9000 How to display Arabic SMS text

    I'm new to these forums so sorry if I'm posting this in the wrong spot .. please redirect me if so.
    Recently bought BB bold 9000 from Vodafone Aust. Need to know how to display msgs or emails received in ARABIC text .. any help would be appreciated.
    Solved!
    Go to Solution.

    Hi,
    Download the OS for the carrier and use Application loader inside the Desktop manager software (that came with the Box)  and select Arabic with the language options (if that is an option).
    Alternatively you could install the OS from an Arabic carrier (involves deleting the vendor.xml file), but its not recommended....
    This is the instructions from my website (the short version):
     Get an OS from here:http://na.blackberry.com/eng/support/downloads/download_sites.jsp
    The Operating system software downloaded from the Blackberry website contains all the files required to reload the O/S.
    The Desktop Manager software is NOT required!
    Once downloaded and installed, follow these directions:
    Download the OS file from your carrier website to the PC then install it to the PC by running (double clicking) the file you downloaded.
    Go to c:\program files\common files\research in motion\apploader and delete the file named "vendor.xml."
    Plug in BB and double click on "Loader.exe." It's located in the same place as the above vendor.xml file.
    The process takes about 45 minutes to an hour depending on how much data you have to backup and restore during the process. Once it's done loading the new OS it will reboot (it may do this twice during the entire process.) You will see a white screen with an hourglass for up to 20 minutes at a time while the DM says "waiting for initialization." If, for some reason, you end up with a white screen with small icons and the number 507, simply connect to the PC again and run Loader.exe again and it should load the OS to the device.
    Checked out my Blackberry FAQ's and Links to Needed Articles here
    http://darkeen.homelinux.com/index.php/Blackberryfaq

  • How to display multple line text in a single cell in ALV?

    Hi all,
    I have 'Material Detailed Description' field in my ALV report, and it's taken from a multiple line text table. Is there any way so I can get this whole text to fit in a single ALV cell (not in single, but multiple line, as in original text data)?
    Thank you.

    Hi
    If you want you can display this long text field in ALV but the allignment of the ALV not looks good. so generally we won't display them in the output,
    instead, in the interactive list write the code to call that MM03 transaction, and the user can see that text in the transaction when ever double clicked on that MATERIAL field.
    Reward points for useful Answers
    Regards
    Anji

  • How to display blob as text in APEX

    hi All,
    I am developing an apex application using the apex cloud (apex.oraclecorp.com). I am using the DB link to show the data on APEX UI. I have a blob data which is stored in the remote DB, and I want to display the BLOB data as text on a popup or a new page or a download link.
    I tried using display only item but APEX throws an error saying that remote DB is not supported. Also, It would be great if I can just show a download link on the UI for the BLOB data, again when I try to select the format as BLOB in the column attributes, When I give the table@dblink as BLOB table I get an error saying that "table@DBLINK not found".
    Is there any way to display the BLOB data as text or download it which is present in my local DB?
    Please help me out.
    Thanks

    2f75c9f8-5675-4cdb-9224-e5c4b5f19bd1 wrote:
    hi All,
    I am developing an apex application using the apex cloud (apex.oraclecorp.com). I am using the DB link to show the data on APEX UI. I have a blob data which is stored in the remote DB, and I want to display the BLOB data as text on a popup or a new page or a download link.
    I tried using display only item but APEX throws an error saying that remote DB is not supported. Also, It would be great if I can just show a download link on the UI for the BLOB data, again when I try to select the format as BLOB in the column attributes, When I give the table@dblink as BLOB table I get an error saying that "table@DBLINK not found".
    Is there any way to display the BLOB data as text or download it which is present in my local DB?
    I don't think your question is clear enough. can you be more specific about what you are trying to achieve and also provide proper information about your apex & database version.
    What you mean by displaying blob as text?? What is stored in your blob columns?
    read 17.10 About BLOB Support in Forms and Reports

  • How to display the dynamic text in the selection screen

    Hi All,
    I want to display the dynamic text in the selection screen .... ( I searched in forums , didnt get the any answer fot this sort of qustion ).....
    EX: If i have the date of today 31st  it has to show message like " today date is 31 like some thing "  when i execute the report .
    Could any one face this sort of requirment, Please let me know.
    Thanks in advance.
    Reagrds,
    Bharani

    Where would you like this dynamic text being displayed? As an "message" or in some parameter field?
    If first
    parameters date type d.
    data: text type string.
    at selection-screen.
       concatenate 'Today is' date into text.
       message text type 'I'.
    If second
    parameters pa_text type c length 50.
    at selection-screen on date.
      if date is not initial.
        concatenate 'Today is' date into  pa_text.
      enidf.
    at selection-screen output.
       "show it as read only
       loop at screen.
        if screen-name = 'PA_TEXT'.
               screen-input = abap_false.
              modify screen.
        endif.
       endloop.
    Regards
    Marcin

  • How to display regular expression text

    I cannot seem to get the text of a regular expression to display in a text input.  The regex is defined as:
    Bindable]  
    private var myRegExp:RegExp=/^.*(?=.{10,32})(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[.!@#$%*^&()+]).*$/;
    In my form, I want to display the actual expression.  The code I am using to do so is:
    <mx:FormItem label="regExpLabel">  
         <mx:TextInput id="regExpTextInput" text="{myRegExp}" />  
    </mx:FormItem>
    When I run the app, the data displayed in the regExpTextInput filed is /^.*(?=.{10,32})(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[.!@#$%*^&()+]).*$/
    What I want to display is only the regular expression, not including the slashes required by Flex at the beginning and end of the string.  The data I want displayed is ^.*(?=.{10,32})(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[.!@#$%*^&()+]).*$
    I tried changing my variable type to String and leaving out the beginning and ending slashes, but that did not work either.  Any thoughts?
    Thanks!

    Hi, I am unable to understand your requirement properly but here is one demo of the using regular expression. In this application I am allowing only those character to be enter in the Textbox which are taken as the valid filename. Hope this will help you.
    I think In your requirement first of all you have to take it as string type. And the second is that use \\ before every special character if you are writing it in the script. As I have done. Pls let me know if you
    Have any issue with the code below.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:Script>
          <![CDATA[
          [Bindable]
          private var regExpForFile : String
          = "0-9A-Za-z\\&\\`\\~\\!\\@\\#\\$\\%\\^\\(\\)\\-\\_\\=\\+\\]\\}\[\\'\\;\\,\\.\\{ ";
          ]]>
    </mx:Script>
          <mx:VBox horizontalAlign="center" width="350">
                <mx:Label text="Enter File Name"/>
                <mx:TextInput id="fileName" width="170" height="20"  restrict="{regExpForFile}"/>
          </mx:VBox>
    </mx:Application>
    with Regards,
    Shardul Singh Bartwal

  • How to display data in text file in column format

    hi
    i am acquiring data from an oscilloscope.
    wen i save the data in a text file using wite to speadsheet string, all the voltage values r displayed first and then the time values... besides its tab delimited
    how can i display it such that the time values r in one column and the voltyage values r in the other column
    thanx
    Solved!
    Go to Solution.

    Hi,
    I think you are collecting data at the same time and as aeastet told building an array will help. the example attached will give you an idea.. Though i am not sure whether this will solve your problem or not.
    Regards,
    Nitzz
    (Kudos are always Welcome, Mark as a solution if it is the One)
    Attachments:
    Untitled 1.vi ‏7 KB

  • How to display in a Text Box.

    This is my scenario.
    I am receiving two numbers as inputs from and html page and displaying the Sum in another jsp page.My problem is logic problem,
    How to convert or display back the sum inside the text box.
    Here I am forwarding my code.
    <%@ page import="java.io.*,
    java.util.*,
    java.lang.*,
    java.lang.String,
    java.text.DateFormat,
    java.text.ParseException,
    java.sql.*,
    java.net.URLEncoder"
    %>
    <%
    int Firstdigit = Integer.parseInt(request.getParameter("Firstdigit"));
    int Seconddigit = Integer.parseInt(request.getParameter("Seconddigit"));
    %>
    <BR>
    <CENTER>
    <P>
    The Addition Result Of The Two Numbers
    <%
    int Sum=Firstdigit + Seconddigit;
    out.println("Sum");
    %>
    <BR>
    <INPUT Type="text" name="Resultdigit" size="40"value=<=%Sum%>
    <BR>
    <P>
    </CENTER>
    Here the output which I get is %Sum% inside the text box.but what I need is the value as integers. Thanks in advance.
    Varghese Job.

    what i can see is the problem with this line
    <INPUT Type="text" name="Resultdigit" size="40"value=<=%Sum%>
    mus be like
    <INPUT Type="text" name="Resultdigit" size="40"value=<%=Sum%>

  • How to display a long text with several in multiple lines in template cell

    Hi,
       here i have one string such as 'Power MOS_TestTestTest'. But it will display in the template cell as
       'Power
       MOS_TestTestTest'.
       And what i want is 'Power MOS_TestTes
                                   tTest'.
      How to achieve this ? ths

    Hi,
    If the Width of the Templete in not sufficient to display whole text then from the next word it is dislpayed in the next line. As in your case ..
    'Power
    MOS_TestTestTest'.
    If you want to have this like
    'Power MOS_TestTes
    tTest'.
    You need to write the logic to split the string as per your rquirement and print them.

  • How to display only a text in a string as a link??

    Hi All,
    In my application I have a datagrid. In 1 column of the datagrid I am populating messages which are posted from user. My problem is i have to search for a particualr text in all the messages and if it is there then i have to display as a link/linkbutton/button.
    Could you please let me know how can i do this
    Thanks

    Here is the solution that should work for any size text and any maximum width. This solution will lock the JTextPane to the maximum width while allowing the dialog height to grow to fit the text.
    import javax.swing.*;*
    import java.awt.*;
    public class FooDialog extends JDialog{
       public static void main(String args[]) {
          final int MAX_WIDTH = 256;
          //build the dialog
          FooDialog dialog = new FooDialog();
          JTextPane textPane = new JTextPane();
          textPane.setEditable(false);
          textPane.setText(
          "FOOBAR FOOBAR FOOBAR FOOBAR FOOBAR FOOBAR FOOBAR FOOBAR FOOBAR");
          JScrollPane scrollPane =
             new JScrollPane(textPane,
                                      JScrollPane.VERTICAL_SCROLLBAR_NEVER,
                                      JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
          scrollPane.setBorder(null);
          scrollPane.setPreferredSize(new Dimension(MAX_WIDTH, 0));
          dialog.add(scrollPane, BorderLayout.CENTER);
          //show the dialog
          dialog.pack();
          JViewport viewport = scrollPane.getViewport();
          viewport.doLayout();
          scrollPane.setPreferredSize(viewport.getViewSize());
          dialog.pack();
          dialog.setVisible(true);
    }The first pack() will lay out the dialog, but the viewport.doLayout() will insure that the JTextPane is laid out. (Which rarely happens with the first pack() alone.) The last pack() re-lays out the dialog with the JScrollPane 's new preferred size--the view size that the JTextPane became during the viewport.doLayout() .

  • How to display different subtotal text for each group in alv report

    Hi,
    i need to display subtotal text as "totals of  Mat1"  for material numbers 1 to 10 as group1 and again i need to display subtotal text as " totals of Mat2" for material number 11 to 20.
    group 2.
    Please help me asap.

    You can create subtotals by columns.
    You would need extra column to group the materials( 1 to 10 GROUP1 20 to 30 GROUP2 by example)  and use this column for subtotals

  • How to display the Standard Text (SO10) based on condition in adobe forms

    Hi,
    I have created the Standard texts (through SO10 tr.code) of 4 plant addresses. In the Layout of adobe form, i want to display any one plant address based on the plant number (as a input) and the rest 3 standard text need to be hide. i tried in Form clac to hide, but i unable to succeed. could you please help me, in this regard. 
    Thank you.
    Regards,
    Mallikarjuna

    Hi,
    You can add all the 4 text in your context menu and create an condition for text.
    Example: (LS_HEADER is a structure only for example, you need to decide based on your own form interface)
    Text_1000                                Condition -> LS_HEADER-WERKS = 1000
    Text_2000                                Condition -> LS_HEADER-WERKS = 2000
    Text_3000                                Condition -> LS_HEADER-WERKS = 3000
    Text_4000                                Condition -> LS_HEADER-WERKS = 4000
    The text satisfyling your condition will only be printed and you can assign these text to the same block in PDF form.

Maybe you are looking for