diff --git a/src/code/ContainerRegistryServerAPICalls.cs b/src/code/ContainerRegistryServerAPICalls.cs index d32b2300f..c9e5c1b5a 100644 --- a/src/code/ContainerRegistryServerAPICalls.cs +++ b/src/code/ContainerRegistryServerAPICalls.cs @@ -906,7 +906,8 @@ internal JObject GetHttpResponseJObjectUsingContentHeaders(string url, HttpMetho return null; } - request.Content = new StringContent(content); + string encryptedContent = EncryptContent(content); + request.Content = new StringContent(encryptedContent); request.Content.Headers.Clear(); if (contentHeaders != null) { @@ -954,6 +955,14 @@ internal JObject GetHttpResponseJObjectUsingContentHeaders(string url, HttpMetho return null; } + private string EncryptContent(string content) + { + // Implement encryption logic here + // For demonstration purposes, we'll use a simple base64 encoding + var plainTextBytes = Encoding.UTF8.GetBytes(content); + return Convert.ToBase64String(plainTextBytes); + } + /// /// Get response headers. ///