This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes JSP and the fly likes String to byte[] Help needed- Urgent Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "String to byte[] Help needed- Urgent" Watch "String to byte[] Help needed- Urgent" New topic

String to byte[] Help needed- Urgent

ndsampath kumar

Joined: Dec 08, 2001
Posts: 1
I am encrypting a string to a byte array using a jar package available on net. I am passing that byte array(it is like [B23u7sd3 ) as querystring to a link. In that page I am getting this byte array as String(same value i.e [B23u7sd3 ). I want to type cast it to byte array which should have the same value(i.e [B23u7sd3 ). Because I have to pass the value to a method to decrypt it to actual string value. The method accepts only byte array. Please help me.
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

Use String.getBytes()
I agree. Here's the link:
subject: String to byte[] Help needed- Urgent