aboutsummaryrefslogtreecommitdiff
path: root/wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/NCNip44EncryptionVersion.cs
diff options
context:
space:
mode:
Diffstat (limited to 'wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/NCNip44EncryptionVersion.cs')
-rw-r--r--wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/NCNip44EncryptionVersion.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/NCNip44EncryptionVersion.cs b/wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/NCNip44EncryptionVersion.cs
index e572dd7..0d5907a 100644
--- a/wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/NCNip44EncryptionVersion.cs
+++ b/wrappers/dotnet/VNLib.Utils.Cryptography.Noscrypt/src/NCNip44EncryptionVersion.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 NIP44 encryption version used by the Nostr protocol
/// </summary>
- public sealed class NCNip44EncryptionVersion : IEncryptionVersion
+ public sealed class NCNip44EncryptionVersion : INostrEncryptionVersion
{
/// <summary>
/// A static nip44 encryption version instance
@@ -28,10 +28,12 @@ namespace VNLib.Utils.Cryptography.Noscrypt
public static readonly NCNip44EncryptionVersion Instance = new();
///<inheritdoc/>
- uint IEncryptionVersion.Version => NC_ENC_VERSION_NIP44;
+ uint INostrEncryptionVersion.Version => NC_ENC_VERSION_NIP44;
+
+ int INostrEncryptionVersion.GetMessageBufferSize(int dataSize) => Nip44Util.CalcFinalBufferSize(dataSize);
///<inheritdoc/>
- int IEncryptionVersion.CalcBufferSize(int dataSize) => Nip44Util.CalcBufferSize(dataSize);
+ int INostrEncryptionVersion.GetPayloadBufferSize(int dataSize) => Nip44Util.CalcBufferSize(dataSize);
}
}