I'm new to Encryptions. I'm finding codes about encryption and i'm trying to know how it is working because it's interesting and I like to code it in the future.
Then I found this code:
System.out.print("Enter text: ");
String text = dataIn.readLine();
String key = "Bar12345Bar12345"; // 128 bit key
// Create key and cipher
Key aesKey = new SecretKeySpec(key.getBytes(), "AES");
Cipher cipher = Cipher.getInstance("AES");
...
Before I start working on it. I don't know how String = Bar12345Bar12345 works. It says that it is 128 bit key. Is the String constant? Is it okay to change it?
hash function? Sorry i'm beginner in Encryption.