private void GenerateUtility_class_UserPasswordAndName(out string nameCrypt, out string passwordCrypt) { string nameForEncription = Statics.GetUniqueKeyOriginal_BIASED(_rnd.Next(5, 8)); string passForEncription = Statics.GetUniqueKeyOriginal_BIASED(_rnd.Next(5, 15)); string encryptedName = Statics.Encrypt(nameForEncription, ENCRIPTION_PHRASE); string encryptedPassword = Statics.Encrypt(passForEncription, ENCRIPTION_PHRASE); nameCrypt = encryptedName; passwordCrypt = encryptedPassword; }
private void AddOneCustomer() { RandomUserAPIObject deserializedRandomUserObject = JsonConvert.DeserializeObject <RandomUserAPIObject>(Statics.ReadFromUrl(_apiUrl)); Customer customer = new Customer(); customer.FIRST_NAME = deserializedRandomUserObject.results[0].name.first; customer.LAST_NAME = deserializedRandomUserObject.results[0].name.last; customer.PHONE_NO = deserializedRandomUserObject.results[0].phone; customer.ADDRESS = $"{deserializedRandomUserObject.results[0].location.city}, {deserializedRandomUserObject.results[0].location.street} st, {deserializedRandomUserObject.results[0].location.coordinates.latitude} / {deserializedRandomUserObject.results[0].location.coordinates.longitude}"; customer.CREDIT_CARD_NUMBER = Statics.Encrypt(Statics.DashingString(Statics.GetUniqueKeyOriginal_BIASED(20, Charset.OnlyNumber), 4), ENCRIPTION_PHRASE); customer.IMAGE = ImageProvider.GetResizedCustomerImageAs64BaseString(4); _currentWithUtility_clas_UserDAO = CreateAppropriateDAO_WithUtility_class_User(); GenerateUtility_class_UserPasswordAndName(out string nameCrypt, out string passsCrypt); _currentWithUtility_clas_UserDAO.Add(customer as T, nameCrypt, passsCrypt); }