Added parameter 'key' to encryption methods to allow own keys