12345678910111213141516171819202122 |
- using Luticate2.Auth.Interfaces.Users;
- using Xunit;
-
- namespace TestAuth.Business
- {
- public class LuUsersBusinessTest
- {
- [Fact]
- public void TestPassword()
- {
- Tests.TestRealDb<ILuUsersBusiness>(business =>
- {
- var password = "test42";
- var salt = business.GenerateSalt();
- var hashed = business.HashPassword(password, salt);
- Assert.True(business.VerifyPasswordHash(password, hashed, salt));
- Assert.False(business.VerifyPasswordHash(password + "0", hashed, salt));
- Assert.False(business.VerifyPasswordHash("0" + password, hashed, salt));
- });
- }
- }
- }
|