diff options
author | vnugent <public@vaughnnugent.com> | 2023-10-18 14:24:51 -0400 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2023-10-18 14:24:51 -0400 |
commit | 96d4e6c61900a8c0a61e5b34e0fcabe6b9645421 (patch) | |
tree | 4422b06c0002271e9609ef219e6fa689ca501ca8 /back-end/libs/NVault.Crypto.Secp256k1/src/Secp256k1Context.cs | |
parent | fcf2497e534cf5e0cae4cc2cd56962688a14bbad (diff) |
add missing secret key verification
Diffstat (limited to 'back-end/libs/NVault.Crypto.Secp256k1/src/Secp256k1Context.cs')
-rw-r--r-- | back-end/libs/NVault.Crypto.Secp256k1/src/Secp256k1Context.cs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/back-end/libs/NVault.Crypto.Secp256k1/src/Secp256k1Context.cs b/back-end/libs/NVault.Crypto.Secp256k1/src/Secp256k1Context.cs index 8aac0b8..67f1d9f 100644 --- a/back-end/libs/NVault.Crypto.Secp256k1/src/Secp256k1Context.cs +++ b/back-end/libs/NVault.Crypto.Secp256k1/src/Secp256k1Context.cs @@ -14,6 +14,7 @@ // along with this program. If not, see <https://www.gnu.org/licenses/>. using System; +using System.Runtime.InteropServices; using VNLib.Utils.Extensions; using VNLib.Utils.Memory; @@ -57,7 +58,7 @@ namespace NVault.Crypto.Secp256k1 { Lib.SafeLibHandle.ThrowIfClosed(); - fixed (byte* sk = secretKey) + fixed (byte* sk = &MemoryMarshal.GetReference(secretKey)) { //Create the keypair from the secret key return Lib._createKeyPair(Context, keyPair, sk) == 1; |