fixes in encryption methods and init method