Refactor crypt data generation