using System; using System.Collections; using framework_business; using framework_library; class SetPasswordTest { static int Main(string[] args) { EnvBootstrap.LoadFile(@"c:\DEV work\shou-1\.env"); int userId = int.Parse(args[0]); string plain = args[1]; string email = args[2]; PasswordService.SetPassword(userId, plain); ArrayList matches = PasswordService.ValidateLogin(email, plain); Console.WriteLine("bcrypt_matches=" + matches.Count); string hash = PasswordService.GetPasswordHash(userId); Console.WriteLine("hash_present=" + (!string.IsNullOrEmpty(hash))); return matches.Count == 1 ? 0 : 1; } }