SecretKeySpeckeySpec=newSecretKeySpec(_key,"AES");// Create a new SecretKeySpec for the specified key data and algorithm name.
IvParameterSpecivSpec=newIvParameterSpec(_iv);// Create a new IvParameterSpec instance with the bytes from the specified buffer iv used as initialization vector.
// encryption
if(mode.equals(EncryptMode.ENCRYPT)){
// Potentially insecure random numbers on Android 4.3 and older. Read for more info.