From 8bf42df576f494f89b6058ad2dd8a9d5cdbff0a1 Mon Sep 17 00:00:00 2001 From: vnugent Date: Sun, 18 Feb 2024 13:47:24 -0500 Subject: refactor: deprecate secp256k1 native, transition to noscrypt library --- lib/NVault.Crypto.Noscrypt/src/IRandomSource.cs | 32 +++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 lib/NVault.Crypto.Noscrypt/src/IRandomSource.cs (limited to 'lib/NVault.Crypto.Noscrypt/src/IRandomSource.cs') diff --git a/lib/NVault.Crypto.Noscrypt/src/IRandomSource.cs b/lib/NVault.Crypto.Noscrypt/src/IRandomSource.cs new file mode 100644 index 0000000..ae4492a --- /dev/null +++ b/lib/NVault.Crypto.Noscrypt/src/IRandomSource.cs @@ -0,0 +1,32 @@ +// Copyright (C) 2024 Vaughn Nugent +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . + +using System; + +namespace NVault.Crypto.Noscrypt +{ + /// + /// Represents a generator for random data, that fills abinary buffer with random bytes + /// on demand. + /// + public interface IRandomSource + { + /// + /// Fills the given buffer with random bytes + /// + /// Binary buffer to fill with random data + void GetRandomBytes(Span buffer); + } +} \ No newline at end of file -- cgit