How to convert Byte array to String type

P

peeushonline

During a project dealing with encryption and decryption in password
based encryption, I'm facing a problem while reading a Byte array.
When the size of the string input during the encryption is small then
both the decryption and the string shown are correct but when the
string is large it shows error.

byte[] textTranslated = pbeCipher.doFinal(textInBytes);
return new String(textTranslated);

by using this code i'm not getting the full string when its large.
So tell me how to convert a byte array to string and read
successfully.
Pls Help. Thanx in advance.
 
A

Andrew Thompson

During a project dealing with encryption and decryption in password
based encryption, I'm facing a problem while reading a Byte array.
When the size of the string input during the encryption is small then
both the decryption and the string shown are correct but when the
string is large it shows error.

Would that be a TimeTurnsKittensIntoCatsError?
Or would you just like us to guess?
<http://www.physci.org/codes/javafaq.html#exact>

--
Andrew Thompson
http://www.athompson.info/andrew/

Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-general/200704/1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,525
Members
44,997
Latest member
mileyka

Latest Threads

Top