aboutsummaryrefslogtreecommitdiff
path: root/wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/NCNip04EncryptionVersion.cs
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2024-06-20 21:38:00 -0400
committerLibravatar vnugent <public@vaughnnugent.com>2024-06-20 21:38:00 -0400
commiteefbfce0af26be62ec3b329e4ef78f12f5f71c98 (patch)
treea948724be366cdcbba022a6594dd32b01388c295 /wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/NCNip04EncryptionVersion.cs
parent0e0d7701979cd09e67cbd0137016ba6a5bb3b803 (diff)
push latest c-sharp changes
Diffstat (limited to 'wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/NCNip04EncryptionVersion.cs')
-rw-r--r--wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/NCNip04EncryptionVersion.cs13
1 files changed, 8 insertions, 5 deletions
diff --git a/wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/NCNip04EncryptionVersion.cs b/wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/NCNip04EncryptionVersion.cs
index 69234fe..beb21c2 100644
--- a/wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/NCNip04EncryptionVersion.cs
+++ b/wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/NCNip04EncryptionVersion.cs
@@ -13,14 +13,14 @@
// 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 static VNLib.Utils.Cryptography.Noscrypt.LibNoscrypt;
+using static VNLib.Utils.Cryptography.Noscrypt.NoscryptLibrary;
namespace VNLib.Utils.Cryptography.Noscrypt
{
/// <summary>
/// The NIP04 encryption version used by the Nostr protocol
/// </summary>
- public sealed class NCNip04EncryptionVersion : IEncryptionVersion
+ public sealed class NCNip04EncryptionVersion : INostrEncryptionVersion
{
/// <summary>
/// A static nip04 encryption version instance
@@ -28,10 +28,13 @@ namespace VNLib.Utils.Cryptography.Noscrypt
public static readonly NCNip04EncryptionVersion Instance = new();
///<inheritdoc/>
- uint IEncryptionVersion.Version => NC_ENC_VERSION_NIP04;
-
+ uint INostrEncryptionVersion.Version => NC_ENC_VERSION_NIP04;
+
+ ///<inheritdoc/>
+ int INostrEncryptionVersion.GetMessageBufferSize(int dataSize) => Nip04Util.CalcBufferSize(dataSize);
+
///<inheritdoc/>
- int IEncryptionVersion.CalcBufferSize(int dataSize) => Nip04Util.CalcBufferSize(dataSize);
+ int INostrEncryptionVersion.GetPayloadBufferSize(int dataSize) => Nip04Util.CalcBufferSize(dataSize);
}
}