How can this be done? I want to take the resulting aes secretkey and turn it into the plaintext 16byte representation
public SecretKey generateAesKey() throws NoSuchAlgorithmException{
KeyGenerator keygen;
keygen = KeyGenerator.getInstance("AES");
keygen.init(128);
SecretKey aesKey = keygen.generateKey();
return aesKey;
}
Im using this to generate the key (Pretty sure the key would be 32 bytes, unless I'm thinking of 256bit key?)