From 7b230df5d7e31eddc0928023c305d545b17b1613 Mon Sep 17 00:00:00 2001 From: Benjamin Van Renterghem <42121860+benjaminvanrenterghem@users.noreply.github.com> Date: Sun, 12 May 2024 18:17:24 +0200 Subject: [PATCH] dotnet.Nyzo.CL - v1.1.0 - add ByteArrayAsHex to NyzoUtil --- dotnet.Nyzo.CL.Tests/Nyzo.CL.Tests.csproj | 2 +- dotnet.Nyzo.CL/Nyzo.CL.csproj | 2 +- dotnet.Nyzo.CL/NyzoUtil.cs | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/dotnet.Nyzo.CL.Tests/Nyzo.CL.Tests.csproj b/dotnet.Nyzo.CL.Tests/Nyzo.CL.Tests.csproj index 2e4ea02..1f95e4b 100644 --- a/dotnet.Nyzo.CL.Tests/Nyzo.CL.Tests.csproj +++ b/dotnet.Nyzo.CL.Tests/Nyzo.CL.Tests.csproj @@ -2,7 +2,7 @@ Nyzo.CL.Tests - 1.0.0 + 1.1.0 Benjamin Van Renterghem construct0 xUnit test project for the Nyzo class library (Nyzo.CL). The version indicates which Nyzo.CL version it is paired to. diff --git a/dotnet.Nyzo.CL/Nyzo.CL.csproj b/dotnet.Nyzo.CL/Nyzo.CL.csproj index 14a8c00..ee97593 100644 --- a/dotnet.Nyzo.CL/Nyzo.CL.csproj +++ b/dotnet.Nyzo.CL/Nyzo.CL.csproj @@ -2,7 +2,7 @@ Nyzo.CL - 1.0.0 + 1.1.0 Benjamin Van Renterghem construct0 Nyzo class library. diff --git a/dotnet.Nyzo.CL/NyzoUtil.cs b/dotnet.Nyzo.CL/NyzoUtil.cs index 226383a..d032d31 100644 --- a/dotnet.Nyzo.CL/NyzoUtil.cs +++ b/dotnet.Nyzo.CL/NyzoUtil.cs @@ -7,6 +7,13 @@ namespace Nyzo.CL; public static class NyzoUtil { + public static string ByteArrayAsHexString(byte[] array) { + return BitConverter.ToString(array) + .Replace("-", "") + .ToLower() + ; + } + public static byte[] HexStringAsByteArray(string identifier){ identifier = identifier.Replace("-", "");