Changed return types of encryption/decryption functions, modified workings of generateKeys.