/// <summary> /// Constructor /// </summary> /// <param name="legalReceiver">The legal receiver</param> /// <param name="keyManager">Key manager</param> /// <param name="logger">Logger</param> public DecryptRequestFilter( IKeyManager keyManager, ILogger <DecryptRequestFilter> logger) { this.keyManager = keyManager; this.logger = logger; }
public TPMContext(string deviceName, TPMWrapper tpm) { _deviceName = deviceName; _tpm = tpm; _authHandleManager = new AuthHandleManager(this); _keyManager = new KeyManager(this); }
public HomeController(IDataProtectionProvider provider, IKeyManager keyManager) { var dataProtector = provider.CreateProtector("W3E72EFS4MN9LOP0FDWJ7F6E0FSW"); _timeLimitedDataProtector = dataProtector.ToTimeLimitedDataProtector(); _keyManager = keyManager; }
public ValuesController(IDataProtectionProvider provider, IKeyManager keyManager) { _provider = provider; _dataProtector = provider.CreateProtector("3BCE558E2AD3E0E34A7743EAB5AEA2A9BD2575A0"); _timeLimitedDataProtector = _dataProtector.ToTimeLimitedDataProtector(); _keyManager = keyManager; }
internal KeyManager() { string currentKeyManagementSystem = ConfigurationManager.AppSettings["currentKeyManagementSystem"]; switch (currentKeyManagementSystem) { case "simple": ActualKeyManager = new SimpleKeyManager(); break; case "knox": ActualKeyManager = new KnoxKeyManager(); break; case "vault": ActualKeyManager = new VaultKeyManager(); break; case "keywhiz": ActualKeyManager = new KeywhizKeyManager(); break; case "barbican": ActualKeyManager = new BarbicanKeyManager(); break; case "conjur": ActualKeyManager = new ConjurKeyManager(); break; default: throw new NotImplementedException(); } }
public void Save() { Key.name = Name; Key.title = Title; Key.description = Description; Key.notes = Notes; Key.copyright = Copyright; Key.Publish = Publish; if (Key.id == 0) { IKeyManager.Insert(Key); } else { IKeyManager.Update(Key); } foreach (var literature in LiteratureItems) { if (_originalLiteratureItems.Contains(literature)) { IKeyManager.Update(literature); _originalLiteratureItems.Remove(literature); } else { literature.key_id = Key.id; IKeyManager.Insert(literature); } } foreach (var literature in _originalLiteratureItems) { IKeyManager.Delete(literature); } _originalLiteratureItems.Clear(); }
public string PassPhrase => IsPasswordSet ? "Please confirm your pin:" : "Set a six-digit passcode:"; // Could think of a converter to switch the sentence view side public MainPageViewModel(INavigationService navigationService, IKeyManager keyManager, IDialogServiceEx dialogService) { _navigationService = navigationService; _keyManager = keyManager; TryLoginCommand = new RelayCommand(TryLogin, IsPasswordValid); _dialogService = dialogService; }
public RoleManager(IRoleData roleData, IStringLocalizer <RoleManager> localizer, ILogger <RoleManager> logger, IKeyManager keyManager) { _roleData = roleData; _localizer = localizer; _logger = logger; _keyManager = keyManager; }
public AppEnvironment(IKeyManager keyManager, IServiceManager serviceManager, IRoleManager roleManager, IApiManager apiManager, IStringLocalizer <IAppEnvironment> stringLocalizer) { _keyManager = keyManager; _serviceManager = serviceManager; _roleManager = roleManager; _apiManager = apiManager; _stringLocalizer = stringLocalizer; }
public static VirtualKeyManager <TEnum> Get <TEnum>() { if (manager == null) { manager = new VirtualKeyManager <TEnum>(); } return((VirtualKeyManager <TEnum>)manager); }
private OptionsPanel(IKeyManager keyManager) { InitializeComponent(); _keyManager = keyManager; uacIcoPanel.Paint += OnPaint_ElevatedIconPanel; keyCreateIcoPanel.Paint += OnPaint_KeyCreateIconPanel; }
public void Load() { LiteratureItems = new ObservableCollection <Library.DBObject.Literature>(IKeyManager.GetLiteratureEnumeratorForKey(Key.id).OrderBy(n => n.position)); if (LiteratureItems.Count > 0) { SelectedLiterature = LiteratureItems[0]; } }
/// <summary> /// KeyStoreProvider constructor /// </summary> public KeyStoreProviderProxy() { try { keyManager = new KeyManager(null); } catch (Exception ex) { ExceptionHandler.HandleException(ex); } }
public ApiKeyValidator(KeySecretValidator keySecretValidator, IStringLocalizer <ApiKeyValidator> localizer, ILogger <ApiKeyValidator> logger, IApiManager apiManager, IKeyManager keyManager, IServiceManager serviceManager) { _keySecretValidator = keySecretValidator; _localizer = localizer; _logger = logger; _apiManager = apiManager; _keyManager = keyManager; _serviceManager = serviceManager; }
public ApiManager(IApiData apiData, IStringLocalizer <IApiManager> localizer, ILogger <IApiManager> logger, IKeyManager keyManager, IRoleData roleData) { _apiData = apiData; _localizer = localizer; _logger = logger; _keyManager = keyManager; _roleData = roleData; }
public KeyRingProvider(IKeyManager keyManager, KeyManagementOptions keyManagementOptions, IServiceProvider services) { _keyManagementOptions = new KeyManagementOptions(keyManagementOptions); // clone so new instance is immutable _keyManager = keyManager; _cacheableKeyRingProvider = services?.GetService <ICacheableKeyRingProvider>() ?? this; _logger = services?.GetLogger <KeyRingProvider>(); _defaultKeyResolver = services?.GetService <IDefaultKeyResolver>() ?? new DefaultKeyResolver(_keyManagementOptions.KeyPropagationWindow, _keyManagementOptions.MaxServerClockSkew, services); }
public ShareManager(int treshold, HsmFactory hsmFactory, IKeyManager keyManager, ICentralDbRepository centralDbRepository, List <IPublicShareHolder> publicShareHolders) { ShareHolders = publicShareHolders; Treshold = treshold; this.hsmFactory = hsmFactory; this.keyManager = keyManager; this.centralDbRepository = centralDbRepository; }
public KeyRingProvider(IKeyManager keyManager, KeyManagementOptions keyManagementOptions, IServiceProvider services) { _keyManagementOptions = new KeyManagementOptions(keyManagementOptions); // clone so new instance is immutable _keyManager = keyManager; _cacheableKeyRingProvider = services?.GetService<ICacheableKeyRingProvider>() ?? this; _logger = services?.GetLogger<KeyRingProvider>(); _defaultKeyResolver = services?.GetService<IDefaultKeyResolver>() ?? new DefaultKeyResolver(_keyManagementOptions.KeyPropagationWindow, _keyManagementOptions.MaxServerClockSkew, services); }
/// <summary> /// Constructor /// </summary> public EncryptHttpClientHandler( IKeyManager keyManager, IMemoryCache memoryCache, ILogger <EncryptHttpClientHandler> logger) { this.keyManager = keyManager; this.memoryCache = memoryCache; this.logger = logger; }
public MainViewModel(INavigationService navigationService, IKeyManager keyManager, IDialogService dialogService) { _navigationService = navigationService; _dialogService = dialogService; _keyManager = keyManager; //Check is pin already setup CheckPin(); }
/// <summary> /// Constructor /// </summary> /// <param name="keyManager">Key Manager</param> /// <param name="memoryCache">MemoryCache</param> /// <param name="logger"></param> public PollyRetryPolicyHandler( IKeyManager keyManager, IMemoryCache memoryCache, ILogger <PollyRetryPolicyHandler> logger) { this.keyManager = keyManager; this.memoryCache = memoryCache; this.logger = logger; }
private static ICacheableKeyRingProvider CreateKeyRingProvider(IKeyManager keyManager, IDefaultKeyResolver defaultKeyResolver, KeyManagementOptions keyManagementOptions = null) { var serviceCollection = new ServiceCollection(); serviceCollection.AddSingleton <IDefaultKeyResolver>(defaultKeyResolver); return(new KeyRingProvider( keyManager: keyManager, keyManagementOptions: keyManagementOptions, services: serviceCollection.BuildServiceProvider())); }
public ContextBuilder(Configuration config) { _config = config; _redisConfig = _config.GetRedisSettings(); _clientsPool = new ObjectClientsPool(_redisConfig); _keys = new KeyManager(_config); _proxyGen = new ProxyGenerator(); _implSelector = new ImplBuilder(_config); }
public Context(Configuration config, ObjectClient client, IKeyManager keyMgr, IImplBuilder implSelector, ProxyGenerator proxyGen) { Config = config; Client = client; Keys = keyMgr; Implementations = implSelector; Proxies = proxyGen; }
public KeySecretValidator(IKeyManager keyManager, IStringLocalizer <KeySecretValidator> localizer, ILogger <KeySecretValidator> logger, KeySecretCache keySecretCache) { _keyManager = keyManager; _localizer = localizer; _logger = logger; _keySecretCache = keySecretCache; }
public void Save() { Key.name = Name; Key.title = Title; Key.description = Description; Key.notes = Notes; Key.copyright = Copyright; Key.Publish = Publish; IKeyManager.Update(Key); }
public RestrictedController( IDataProtectionProvider protector, IOptionsMonitor <CookieAuthenticationOptions> options, IHttpContextAccessor httpContextAccessor, IKeyManager keyManager) { _protector = protector; _opts = options.Get("DemoProtectApplication.Cookies"); _httpContextAccessor = httpContextAccessor; _keyManager = keyManager; }
public KeyRingProvider( IKeyManager keyManager, IOptions <KeyRotationOptions> keyManagementOptions, // options change from original KeyManagementOptions IDefaultKeyResolver defaultKeyResolver) : this( keyManager, keyManagementOptions, defaultKeyResolver, NullLoggerFactory.Instance) { }
public KeyRingProvider( IKeyManager keyManager, IOptions <KeyManagementOptions> keyManagementOptions, IDefaultKeyResolver defaultKeyResolver) : this( keyManager, keyManagementOptions, defaultKeyResolver, NullLoggerFactory.Instance) { }
public DefaultDataProtectionProvider( [NotNull] IOptions <DataProtectionOptions> optionsAccessor, [NotNull] IKeyManager keyManager) { KeyRingBasedDataProtectionProvider rootProvider = new KeyRingBasedDataProtectionProvider(new KeyRingProvider(keyManager)); var options = optionsAccessor.Options; _innerProvider = (!String.IsNullOrEmpty(options.ApplicationDiscriminator)) ? (IDataProtectionProvider)rootProvider.CreateProtector(options.ApplicationDiscriminator) : rootProvider; }
public ServiceManager(IServiceData serviceData, IStringLocalizer <IServiceManager> localizer, ILogger <IServiceManager> logger, IKeyManager keyManager, IRoleManager roleManager, IApiManager apiManager ) { _serviceData = serviceData; _localizer = localizer; _logger = logger; _keyManager = keyManager; _roleManager = roleManager; _apiManager = apiManager; }
public HomeController(IKeyManager keyManager, IConfiguration configuration, ILoggerFactory loggerFactory) { _keyring = new AzureKeyVaultKeyRingRepository( keyRingName: configuration["DataProtection:KeyRingName"], vaultUrl: configuration["Vault:Url"], clientId: configuration["Vault:ClientId"], tenantId: configuration["Vault:TenantId"], secret: configuration["Vault:Secret"], loggerFactory: loggerFactory); _keyManager = keyManager; }
private static ICacheableKeyRingProvider CreateKeyRingProvider(IKeyManager keyManager, IDefaultKeyResolver defaultKeyResolver, KeyManagementOptions keyManagementOptions= null) { var serviceCollection = new ServiceCollection(); serviceCollection.AddInstance<IDefaultKeyResolver>(defaultKeyResolver); return new KeyRingProvider( keyManager: keyManager, keyManagementOptions: keyManagementOptions, services: serviceCollection.BuildServiceProvider()); }
public KeyStoreProviderProxy(IKeyManager keyManager) { try { this.keyManager = keyManager; } catch (Exception ex) { ExceptionHandler.HandleException(ex); } }