retrying aes encryption