Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

String to byte[] Help needed- Urgent

 
ndsampath kumar
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use String.getBytes()
Dave.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic