public Invite CreateInvite(AuthenticationAccount account, ConfirmationType type) => new Invite { Id = Guid.NewGuid(), Type = type, Email = account.ServiceId, ConfirmationCode = dataGenerator.GenerateSequence(FieldsLength.ConfirmationCode), IsUsed = false, AccountId = account.Id, PasswordRestore = false, };
public PasswordToken CreatePasswordToken(string userPassword) { var salt = dataGenerator.GenerateSequence(FieldsLength.Salt); var hash = GetHash(userPassword, salt); return(new PasswordToken { Salt = salt, Base64Hash = hash.ToBase64() }); }