How to encrypt/decrypt multiple strings in AES encryption??

Posted by sebby_zml on Stack Overflow See other posts from Stack Overflow or by sebby_zml
Published on 2010-04-29T01:51:44Z Indexed on 2010/04/29 1:57 UTC
Read the original article Hit count: 581

Filed under:
|
|

hello again everyone,

i would like to know if i could encrypt two or more strings in AES encryption. let say, i want to encrypt username, password and nonce_value, can i use the following code?

try{
 String codeWord = username, password, nonceInString;
 String encryptedData = aseEncryptDecrypt.encrypt(codeWord);
 String decryptedData = aseEncryptDecrypt.decrypt(encryptedData);

 System.out.println("Encrypted : " + encryptedData);
 System.out.println("Decrypted : " + decryptedData);

}catch (Throwable e) { // TODO Auto-generated catch block e.printStackTrace(); }

thanks in advance. your suggestions and guidance will be very helpful for me.

© Stack Overflow or respective owner

Related posts about java

Related posts about aes-encrypt