I am new to security and I was wondering if I can make my program better by changing or adding something to make it better/secure.Should I use a keyGenerator? I have my doubts from my program output.Output:Encrypted Message: +g@v5`   keybyte: [B@71e7a66b   Original string: Message   Original string (Hex): [B@2ac1fdc4public class AES {public static void main(String ... args) throws NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException, UnsupportedEncodingException {    final String Algo=AES;    String key = aaaaaaaaaaaaaaaa;    byte[] keyBytes = key.getBytes(StandardCharsets.UTF_8);    MessageDigest sha= MessageDigest.getInstance(SHA-1);     keyBytes=sha.digest(keyBytes);    keyBytes=Arrays.copyOf(keyBytes, 16);    SecretKeySpec secretKeySpec = new SecretKeySpec(keyBytes, Algo);    Cipher cipher = Cipher.getInstance(Algo);    cipher.init(Cipher.ENCRYPT_MODE, secretKeySpec);    byte[] ciphertext = cipher.doFinal(Message.getBytes());    System.out.println(Encrypted Message:  +new String(ciphertext));    cipher.init(Cipher.DECRYPT_MODE, secretKeySpec);    byte[] original = cipher.doFinal(ciphertext);    String originalString = new String(original);    System.out.println(keybyte: +keyBytes);    System.out.println(Original string:  + originalString + \nOriginal string (Hex):  +original);}}
AES Java security
java;beginner;security;cryptography;aes