-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add .NET 8.0 TFM and use new AesGcm constructor #249
Conversation
@zzyzy it's failing bunch test targets. |
@@ -13,7 +13,7 @@ public class JwtSettings | |||
{ | |||
public JwtSettings() | |||
{ | |||
#if NET472 || NETSTANDARD2_1 | |||
#if NET472 || NETSTANDARD2_1 || NET |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't it be NET8_0
? What NET
specifically targets?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NET
targets .NET 5.0 and above.
It's just for convenience like e.g. if in the future we want to target .NET 9.0 and beyond, we just need to update the csproj file with net9.0
and NET
will cover it automatically without adding NET9_0
to every file.
@dvsekhvalnov Sorry for the late response, I've fixed them. |
@@ -37,7 +45,14 @@ public static byte[][] Encrypt(byte[] key, byte[] iv, byte[] aad, byte[] plainTe | |||
/// <exception cref="CryptographicException">if decryption failed by any reason</exception> | |||
public static byte[] Decrypt(byte[] key, byte[] iv, byte[] aad, byte[] cipherText, byte[] authTag) | |||
{ | |||
#if NET |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i guess we can just collapse both branches together now? No need to use .NET 8.0 specific AesGcm() constructor as you check auth tag length explicitly now. And you can leverage Ensure.BitSize(..)
helper right at the start of the method.
And after just clean up all NET
targeting, cause no need to and PR will become nice & small, just of couple files :)
@@ -58,7 +58,7 @@ public JwtSettings() | |||
{ JwsAlgorithm.ES256, new EcdsaUsingSha(256) }, | |||
{ JwsAlgorithm.ES384, new EcdsaUsingSha(384) }, | |||
{ JwsAlgorithm.ES512, new EcdsaUsingSha(521) } | |||
#elif NETSTANDARD || NET461 || NET472 | |||
#elif NETSTANDARD || NET461 || NET472 || NET |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as mentioned in AesGcmNetCore.cs
comment, no need to touch all project fuke with with extra targeting || NET
as fix is just checking length and should work just fine on every plarform.
Closed in favor of #255 |
Closes #248