From a6abccbf789bb9d31bb6a5178792bca4af41867a Mon Sep 17 00:00:00 2001 From: Xen Date: Sun, 28 Sep 2025 11:04:45 -0700 Subject: [PATCH 1/3] BUGFIX: BigInteger was treating the input as negative number, enforce positiveness Signed-off-by: Xen --- HashifyNet/Core/DataType/Base58/Base58Helper.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/HashifyNet/Core/DataType/Base58/Base58Helper.cs b/HashifyNet/Core/DataType/Base58/Base58Helper.cs index c77b0d7..db20588 100644 --- a/HashifyNet/Core/DataType/Base58/Base58Helper.cs +++ b/HashifyNet/Core/DataType/Base58/Base58Helper.cs @@ -1,4 +1,4 @@ -// * +// * // ***************************************************************************** // * // * Copyright (c) 2025 Deskasoft International @@ -48,11 +48,11 @@ public static string AsBase58String(byte[] data, Base58Variant variant) byte[] lilEndianData = data.Reverse().ToArray(); byte[] dataForBigInt = lilEndianData; - if (dataForBigInt.Length > 0 && (dataForBigInt[0] & 0x80) != 0) + if (dataForBigInt.Length > 0 && (dataForBigInt[dataForBigInt.Length - 1] & 0x80) != 0) { dataForBigInt = new byte[lilEndianData.Length + 1]; - Array.Copy(lilEndianData, 0, dataForBigInt, 1, lilEndianData.Length); - dataForBigInt[0] = 0; + Array.Copy(lilEndianData, 0, dataForBigInt, 0, lilEndianData.Length); + dataForBigInt[dataForBigInt.Length - 1] = 0; } var intData = new BigInteger(dataForBigInt); From fb733e3ae2f2b56e30e236d3edbe81f377236717 Mon Sep 17 00:00:00 2001 From: Xen Date: Sun, 28 Sep 2025 11:05:51 -0700 Subject: [PATCH 2/3] Bump version for hotfix Signed-off-by: Xen --- HashifyNet/HashifyNet.csproj | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/HashifyNet/HashifyNet.csproj b/HashifyNet/HashifyNet.csproj index fbaa1f1..e922ae9 100644 --- a/HashifyNet/HashifyNet.csproj +++ b/HashifyNet/HashifyNet.csproj @@ -102,7 +102,7 @@ Deskasoft International HashifyNET Copyright © Deskasoft International - 7.0.0 + 7.0.1 hashing;hash;algorithms;security;crypto;non-crypto;CLS-compliant;VB.NET;F# True False @@ -121,3 +121,4 @@ + From ae75c8efc6137b11618527b40b8c36d092cf5ec0 Mon Sep 17 00:00:00 2001 From: Xen Date: Sun, 28 Sep 2025 11:07:03 -0700 Subject: [PATCH 3/3] Remove rendundant using from Base58 Helper Signed-off-by: Xen --- HashifyNet/Core/DataType/Base58/Base58Helper.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/HashifyNet/Core/DataType/Base58/Base58Helper.cs b/HashifyNet/Core/DataType/Base58/Base58Helper.cs index db20588..f84b65d 100644 --- a/HashifyNet/Core/DataType/Base58/Base58Helper.cs +++ b/HashifyNet/Core/DataType/Base58/Base58Helper.cs @@ -27,9 +27,6 @@ // ****************************************************************************** // * -using HashifyNet.Algorithms.Blake2; -using HashifyNet.Algorithms.SHA256; -using HashifyNet.Core.Utilities; using System; using System.Linq; using System.Numerics;