diff --git a/src/Geralt/Crypto/IncrementalBLAKE2b.cs b/src/Geralt/Crypto/IncrementalBLAKE2b.cs index 16dd458..311208d 100644 --- a/src/Geralt/Crypto/IncrementalBLAKE2b.cs +++ b/src/Geralt/Crypto/IncrementalBLAKE2b.cs @@ -34,7 +34,7 @@ private unsafe void Initialize(ReadOnlySpan key) fixed (byte* k = key) { int ret = crypto_generichash_init(ref _state, k, (nuint)key.Length, (nuint)_hashSize); - if (ret != 0) { throw new CryptographicException("Error initializing hash."); } + if (ret != 0) { throw new CryptographicException("Error initializing hash function state."); } } } @@ -44,7 +44,7 @@ public unsafe void Update(ReadOnlySpan message) fixed (byte* m = message) { int ret = crypto_generichash_update(ref _state, m, (ulong)message.Length); - if (ret != 0) { throw new CryptographicException("Error updating hash."); } + if (ret != 0) { throw new CryptographicException("Error updating hash function state."); } } } diff --git a/src/Geralt/Crypto/IncrementalEd25519ph.cs b/src/Geralt/Crypto/IncrementalEd25519ph.cs index d98f4e4..a265e5b 100644 --- a/src/Geralt/Crypto/IncrementalEd25519ph.cs +++ b/src/Geralt/Crypto/IncrementalEd25519ph.cs @@ -22,7 +22,7 @@ public IncrementalEd25519ph() private void Initialize() { int ret = crypto_sign_init(ref _state); - if (ret != 0) { throw new CryptographicException("Error initializing signature scheme."); } + if (ret != 0) { throw new CryptographicException("Error initializing signature scheme state."); } } public unsafe void Update(ReadOnlySpan message) @@ -31,7 +31,7 @@ public unsafe void Update(ReadOnlySpan message) fixed (byte* m = message) { int ret = crypto_sign_update(ref _state, m, (ulong)message.Length); - if (ret != 0) { throw new CryptographicException("Error updating signature scheme."); } + if (ret != 0) { throw new CryptographicException("Error updating signature scheme state."); } } } diff --git a/src/Geralt/Crypto/IncrementalPoly1305.cs b/src/Geralt/Crypto/IncrementalPoly1305.cs index e457887..41b11ee 100644 --- a/src/Geralt/Crypto/IncrementalPoly1305.cs +++ b/src/Geralt/Crypto/IncrementalPoly1305.cs @@ -24,7 +24,7 @@ private unsafe void Initialize(ReadOnlySpan oneTimeKey) fixed (byte* k = oneTimeKey) { int ret = crypto_onetimeauth_init(ref _state, k); - if (ret != 0) { throw new CryptographicException("Error initializing message authentication code."); } + if (ret != 0) { throw new CryptographicException("Error initializing message authentication code state."); } } } @@ -34,7 +34,7 @@ public unsafe void Update(ReadOnlySpan message) fixed (byte* m = message) { int ret = crypto_onetimeauth_update(ref _state, m, (ulong)message.Length); - if (ret != 0) { throw new CryptographicException("Error updating message authentication code."); } + if (ret != 0) { throw new CryptographicException("Error updating message authentication code state."); } } }