Hi everyone,
i need some help and guidance in displaying the splitted Strings in order.
let say, i have username, password, nonceInString. i had successfully encrypted and decrypted those. then i split the decrypted data. it was done, too.
i want to display the decrypted data in order. something like this.
userneme: sebastian
password: harrypotter
nonce value: sdgvay1saq3qsd5vc6dger9wqktue2tz*
i tried the following code, but it didn't display like i wish to.
pls help. thanks a lot in advance.
String codeWord = username + ";" + password + ";" + nonceInString;
String encryptedData = aesEncryptDecrypt.encrypt(codeWord);
String decryptedData = aesEncryptDecrypt.decrypt(encryptedData);
String[] splits = decryptedData.split(";");
String[] variables = {"username", "password", "nonce value"};
for (String data : variables){
for (String item : splits){
System.out.println( data + ": "+ item);
}
}