Debugs compatibility check.

This commit is contained in:
Ben 2024-03-26 16:10:50 +01:00
parent d9d8441b6e
commit 9fe97f5d40
No known key found for this signature in database
GPG Key ID: 541B9D8C9F1426A1
3 changed files with 8 additions and 3 deletions

View File

@ -77,7 +77,8 @@ namespace CodexPlugin
private string Hash(string file)
{
var fileBytes = Encoding.ASCII.GetBytes(file);
var fileBytes = Encoding.ASCII.GetBytes(file
.Replace(Environment.NewLine, ""));
var sha = SHA256.Create();
var hash = sha.ComputeHash(fileBytes);
return BitConverter.ToString(hash);

View File

@ -9,7 +9,7 @@ namespace CodexPlugin
{
private readonly MarketplaceStarter marketplaceStarter = new MarketplaceStarter();
private const string DefaultDockerImage = "codexstorage/nim-codex:sha-c219a5f-dist-tests";
private const string DefaultDockerImage = "codexstorage/nim-codex:sha-455b95d-dist-tests";
public const string ApiPortTag = "codex_api_port";
public const string ListenPortTag = "codex_listen_port";
public const string MetricsPortTag = "codex_metrics_port";

View File

@ -1,4 +1,5 @@
using System.Security.Cryptography;
using System.Text;
public static class Program
{
@ -30,7 +31,10 @@ public static class Program
private static string CreateHash()
{
var fileBytes = File.ReadAllBytes(OpenApiFile);
var file = File.ReadAllText(OpenApiFile);
var fileBytes = Encoding.ASCII.GetBytes(file
.Replace(Environment.NewLine, ""));
var sha = SHA256.Create();
var hash = sha.ComputeHash(fileBytes);
return BitConverter.ToString(hash);