/** * Initialise the encryptor. * * @param privateKey the recipient's private key. * @param params encoding and derivation parameters, may be wrapped to include an IV for an underlying block cipher. * @param publicKeyParser the parser for reading the ephemeral public key. */ public void Init(AsymmetricKeyParameter privateKey, ICipherParameters @params, IKeyParser publicKeyParser) { ForEncryption = false; PrivParam = privateKey; KeyParser = publicKeyParser; ExtractParams(@params); }
public ConsulConfigSource(IOptions <ConsulRegistryConfig> agentConfig) { var agentInfo = agentConfig?.Value ?? new ConsulRegistryConfig(); _parser = agentInfo.KeyParser; _httpClient = HttpUtils.CreateClient(agentInfo.AgentAddress, agentInfo.AgentPort); }
public ConsulConfigSource(IOptions <ConsulRegistryConfig> agentConfig, ILogger logger, IConsulAclProvider aclProvider = null) { _logger = logger; var agentInfo = agentConfig?.Value ?? new ConsulRegistryConfig(); _parser = agentInfo.KeyParser; _httpClient = HttpUtils.CreateClient(aclProvider, agentInfo.AgentAddress, agentInfo.AgentPort); }
public ConsulRegistry(IOptions <ConsulRegistryConfig> agentConfig) { var agentInfo = agentConfig?.Value ?? new ConsulRegistryConfig(); _agentAddress = $"http://{agentInfo.AgentAddress}:{agentInfo.AgentPort}"; _parser = agentInfo.KeyParser; _httpClient = new HttpClient() { BaseAddress = new Uri(_agentAddress) }; }
public void UpdateKeyParser(IKeyParser parser) { _parser = parser; }
public void UpdateKeyParser(IKeyParser parser) { }