I would like to store an encrypted password in a Java file. I saw at a solution using javax.crypto, but the problem with that was that the key was being ge
If you use a static key, encrypt and decrypt always give the same result;
public static final String CRYPTOR_KEY = "your static key here"; byte[] keyByte = Base64.getDecoder().decode(CRYPTOR_KEY); key = new SecretKeySpec(keyByte, "AES");