private void UpdateCache(string uri, GitCredentialItem item) { _runCache[GetCacheKey(uri, item)] = new CredentialCacheItem( uri, item.Type.ToString(), item.PromptText, item.Value ); }
public void StoreCredentialCacheItem(CredentialCacheItem item) { if (item == null) throw new ArgumentNullException("item"); if (item.Type == null) throw new ArgumentNullException("item.Type"); string hash = GetCacheKey(item.Type, item.Uri, item.PromptText); using (RegistryKey rk = OpenHKCUKey("Credentials\\" + hash)) { rk.SetValue("Uri", item.Uri); rk.SetValue("Type", item.Type); rk.SetValue("PromptText", item.PromptText); rk.SetValue("Response", Protect(item.Response)); } }