Search:

Type: Posts; User: Zaphod_b

Search: Search took 0.21 seconds.

  1. Replies
    8
    Views
    2,130

    [SOLVED] Re: [Asking] Convert String to Byte Array

    As a matter of conventional programming style, I think it would be better to let the convertStr2Byte() method convert and return the array of bytes and leave printing for the calling function:

    ...
  2. Replies
    8
    Views
    2,130

    [SOLVED] Re: [Asking] Convert String to Byte Array

    Declare an array of bytes. The length of the byte array is equal to the String length()/2.


    byte [] byteArray = new byte[strKey.length()/2];




    Make a loop that goes through the string two...
Results 1 to 2 of 2