added encrypt gen