diff options
author | vnugent <public@vaughnnugent.com> | 2024-02-18 13:47:24 -0500 |
---|---|---|
committer | vnugent <public@vaughnnugent.com> | 2024-02-18 13:47:24 -0500 |
commit | 8bf42df576f494f89b6058ad2dd8a9d5cdbff0a1 (patch) | |
tree | 2723a9befa767f0abce9865b112d5833db88b136 /lib/NVault.Crypto.Noscrypt/src/IRandomSource.cs | |
parent | d9f4778896407ebe6e1b8bb439d2c175b4a22f45 (diff) |
refactor: deprecate secp256k1 native, transition to noscrypt library
Diffstat (limited to 'lib/NVault.Crypto.Noscrypt/src/IRandomSource.cs')
-rw-r--r-- | lib/NVault.Crypto.Noscrypt/src/IRandomSource.cs | 32 |
1 files changed, 32 insertions, 0 deletions
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 <https://www.gnu.org/licenses/>. + +using System; + +namespace NVault.Crypto.Noscrypt +{ + /// <summary> + /// Represents a generator for random data, that fills abinary buffer with random bytes + /// on demand. + /// </summary> + public interface IRandomSource + { + /// <summary> + /// Fills the given buffer with random bytes + /// </summary> + /// <param name="buffer">Binary buffer to fill with random data</param> + void GetRandomBytes(Span<byte> buffer); + } +}
\ No newline at end of file |