public JsFunctionCallerServiceFactory(IJSRuntime jsRuntime, IPasswordCryptologizer cryptologizer, HttpClient httpClient,
                                       IJsClipboardService clipboardService, IObjectValidator objectValidator)
 {
     _jsRuntime        = jsRuntime;
     _cryptologizer    = cryptologizer;
     _httpClient       = httpClient;
     _clipboardService = clipboardService;
     _objectValidator  = objectValidator;
 }
 public JsFunctionCallerService(IJSRuntime jSRuntime, T objectReference, IPasswordCryptologizer cryptologizer,
                                HttpClient http, IJsClipboardService jsClipboardService, IObjectValidator objectValidator)
 {
     _jsRuntime       = jSRuntime;
     _objectReference = DotNetObjectReference.Create(objectReference);
     _cryptologizer   = cryptologizer;
     _http            = http;
     ClipboardService = jsClipboardService;
     ImagePaster      = new ImagePaster <T>(jSRuntime, _objectReference);
     _objectValidator = objectValidator;
 }
 public AuthenticationVerifier(IEnvironmentConfiguration configuration, IPasswordCryptologizer passwordCryptologizer)
 {
     _configuration         = configuration;
     _passwordCryptologizer = passwordCryptologizer;
 }
        public async static ValueTask <bool> ConfirmPassword(this IJSRuntime jsRuntime, GlobalPasswordHashModel model, IPasswordCryptologizer cryptologizer, string description = "")
        {
            var result = await jsRuntime.InvokeAsync <string>("prompt", description + Environment.NewLine + "Please enter the password!").ConfigureAwait(false);

            if (result == null)
            {
                return(false);
            }
            var hash = cryptologizer.EncryptString(cryptologizer.EncryptString(result) + model.Salt);

            return(hash == model.Hash);
        }