Encrypts the provided data using the provided key.
This method already generates a new key for each encryption. generateKey is optional.
Map containing the data and key
data
key
Encrypted data