how to print encrypted string in this encrypting/decrypting code ?
here is full working code for encrypting and decrypting a string. It encrypts entered string and the decrypts it. It doesnt shows the encrypted string.
I just wanted to know how can i show enrypted string too.
Last edited by bond_ankur; 04-07-2006 at 05:21 PM.
In your main, after you receive the encryptedBytes back from the encrypt() method, add
System.out.println( new String(encryptedBytes) );
Originally Posted by nspils
I tried this "System.out.println( new String(encryptionBytes));" in many places in main, BUT its not working, there is no change in output.
AND it is enrcyptionBytes. If possible please tell me the exact line where to place it.
PLEASE HELP ...!!!
You tried this where the bolded line is, and it did not print out?
public static void main(String args) throws Exception
if (args.length !=1)
"USAGE: java LocalEncrypter " + "[String]");
byte encryptionBytes = null;
String input = args;
System.out.println("Entered: " + input);
encryptionBytes = encrypt(input);
System.out.println("Encrypted: " + (new String(encryptionBytes)));
System.out.println("Recovered: " + decrypt(encryptionBytes));
By ObiWan in forum VB Classic
Last Post: 05-23-2006, 11:35 AM
Last Post: 10-03-2005, 12:57 AM
By Martin in forum VB Classic
Last Post: 12-03-2001, 04:53 AM
By Chandra in forum VB Classic
Last Post: 06-22-2000, 08:30 AM
By Robert Rieth in forum VB Classic
Last Post: 04-11-2000, 04:21 AM
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center