I have a c source, I want to change my code to java. : guys.
Thank for your Questions.

This is my c code


int test(unsigned char* input, unsigned char* output, int in_len)
{
   

 int i, out_len = 0;

    for(i = 0; i < in_len; i++)
    {
        if (*(input+i) == 0x23)
        {
            i++;
            *output++ = *(input+i) ^ 0x40;
        }
        else
        {
            *output++ = *(input+i);
        }
        out_len++;
    }
    return(out_len);
}

I want to change my code to java.

I have base64 values before calling test method.

after decoding, I am calling test method by char*

but java has no char*

How Can I use this code by java?

Help me.... Thanks..




  public static byte[] test(byte[] input, byte[]  output, int in_len)
   {
       in
t i, out_len = 0;

       for(i = 0; i < in_len; i++)
       {
           if ((input[i]) == 0x23) 

               i++;
               output[i] = (byte) (input[i] ^ 0x40);
           }
           else
           {
               output[i] = input[i];
           }
           out_len++;
       }
       return(output);
   }




