Exemple #1
0
        public bool CreateAccount(string login, string passwordHash, string email, string promocode)
        {
            Account existing = accountStorage.Load(login);

            if (existing != null)
            {
                return(false);
            }

            Account newAccount = new Account();

            newAccount.id           = HashUtil.FromString64(login);
            newAccount.login        = login;
            newAccount.email        = email;
            newAccount.passwordHash = passwordHash;
            newAccount.promoCode    = promocode;
            newAccount.dateCreated  = DateTime.Now;

            accountStorage.Store(newAccount);

            return(true);
        }
Exemple #2
0
 public static ulong MakeId(string value)
 {
     return(HashUtil.FromString64(value));
 }
 private void OnValidate()
 {
     precomputedAssetId = HashUtil.FromString64(assetNickname);
 }