Change visibility of the method encryptData to public