Skip to content

Commit 778030b

Browse files
committed
Fix nits
1 parent 5176ce5 commit 778030b

File tree

8 files changed

+14
-14
lines changed

8 files changed

+14
-14
lines changed

src/Cryptography/Aegis128L.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ private protected override bool DecryptCore(
108108

109109
int error = crypto_aead_aegis128l_decrypt(
110110
plaintext,
111-
out ulong mlen,
111+
out ulong plaintextLength,
112112
IntPtr.Zero,
113113
ciphertext,
114114
(ulong)ciphertext.Length,
@@ -119,7 +119,7 @@ private protected override bool DecryptCore(
119119

120120
// libsodium clears plaintext if decryption fails
121121

122-
Debug.Assert(error != 0 || (ulong)plaintext.Length == mlen);
122+
Debug.Assert(error != 0 || (ulong)plaintext.Length == plaintextLength);
123123
return error == 0;
124124
}
125125

src/Cryptography/Aegis256.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ private protected override bool DecryptCore(
108108

109109
int error = crypto_aead_aegis256_decrypt(
110110
plaintext,
111-
out ulong mlen,
111+
out ulong plaintextLength,
112112
IntPtr.Zero,
113113
ciphertext,
114114
(ulong)ciphertext.Length,
@@ -119,7 +119,7 @@ private protected override bool DecryptCore(
119119

120120
// libsodium clears plaintext if decryption fails
121121

122-
Debug.Assert(error != 0 || (ulong)plaintext.Length == mlen);
122+
Debug.Assert(error != 0 || (ulong)plaintext.Length == plaintextLength);
123123
return error == 0;
124124
}
125125

src/Cryptography/Aes256Gcm.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ private protected override bool DecryptCore(
133133

134134
int error = crypto_aead_aes256gcm_decrypt(
135135
plaintext,
136-
out ulong mlen,
136+
out ulong plaintextLength,
137137
IntPtr.Zero,
138138
ciphertext,
139139
(ulong)ciphertext.Length,
@@ -144,7 +144,7 @@ private protected override bool DecryptCore(
144144

145145
// libsodium clears plaintext if decryption fails
146146

147-
Debug.Assert(error != 0 || (ulong)plaintext.Length == mlen);
147+
Debug.Assert(error != 0 || (ulong)plaintext.Length == plaintextLength);
148148
return error == 0;
149149
}
150150

src/Cryptography/ChaCha20Poly1305.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ private protected override bool DecryptCore(
108108

109109
int error = crypto_aead_chacha20poly1305_ietf_decrypt(
110110
plaintext,
111-
out ulong mlen,
111+
out ulong plaintextLength,
112112
IntPtr.Zero,
113113
ciphertext,
114114
(ulong)ciphertext.Length,
@@ -119,7 +119,7 @@ private protected override bool DecryptCore(
119119

120120
// libsodium clears plaintext if decryption fails
121121

122-
Debug.Assert(error != 0 || (ulong)plaintext.Length == mlen);
122+
Debug.Assert(error != 0 || (ulong)plaintext.Length == plaintextLength);
123123
return error == 0;
124124
}
125125

src/Cryptography/Ed25519.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,13 @@ private protected override void SignCore(
115115

116116
int error = crypto_sign_ed25519_detached(
117117
signature,
118-
out ulong siglen,
118+
out ulong signatureLength,
119119
data,
120120
(ulong)data.Length,
121121
keyHandle);
122122

123123
Debug.Assert(error == 0);
124-
Debug.Assert((ulong)signature.Length == siglen);
124+
Debug.Assert((ulong)signature.Length == signatureLength);
125125
}
126126

127127
internal override bool TryExportKey(

src/Cryptography/Ed25519ph.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,11 @@ internal override void FinalSignCore(
170170
int error = crypto_sign_ed25519ph_final_create(
171171
ref state.ed25519ph,
172172
signature,
173-
out ulong siglen,
173+
out ulong signatureLength,
174174
keyHandle);
175175

176176
Debug.Assert(error == 0);
177-
Debug.Assert((ulong)signature.Length == siglen);
177+
Debug.Assert((ulong)signature.Length == signatureLength);
178178
}
179179

180180
internal override bool FinalVerifyCore(

src/Experimental/Asn1/Asn1Reader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ private void Fail()
167167
_stack = default;
168168
}
169169

170-
private readonly bool IsInvalidInteger(
170+
private static bool IsInvalidInteger(
171171
ReadOnlySpan<byte> bytes,
172172
int maxSize)
173173
{

tests/Algorithms/Blake2bTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public static void Properties()
2727
[InlineData(256 / 8)]
2828
[InlineData(384 / 8)]
2929
[InlineData(512 / 8)]
30-
public static void PropertiesContructed(int hashSize)
30+
public static void PropertiesConstructed(int hashSize)
3131
{
3232
var a = new Blake2b(hashSize);
3333

0 commit comments

Comments
 (0)