made key required for encrypt() and decrypt()