-
Notifications
You must be signed in to change notification settings - Fork 464
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into alex/system-text-1
- Loading branch information
Showing
29 changed files
with
471 additions
and
403 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
using System; | ||
using System.Security.Cryptography; | ||
|
||
namespace JWT.Algorithms | ||
{ | ||
/// <summary> | ||
/// Implements the "None" algorithm. | ||
/// </summary> | ||
/// <see href="https://datatracker.ietf.org/doc/html/rfc7519#section-6">RFC-7519</see> | ||
public sealed class NoneAlgorithm : IJwtAlgorithm | ||
{ | ||
/// <inheritdoc /> | ||
public string Name => "none"; | ||
|
||
/// <inheritdoc /> | ||
using System; | ||
using System.Security.Cryptography; | ||
|
||
namespace JWT.Algorithms | ||
{ | ||
/// <summary> | ||
/// Implements the "None" algorithm. | ||
/// </summary> | ||
/// <see href="https://datatracker.ietf.org/doc/html/rfc7519#section-6">RFC-7519</see> | ||
public sealed class NoneAlgorithm : IJwtAlgorithm | ||
{ | ||
/// <inheritdoc /> | ||
public string Name => "none"; | ||
|
||
/// <inheritdoc /> | ||
public HashAlgorithmName HashAlgorithmName => | ||
throw new NotSupportedException("The None algorithm doesn't have any hash algorithm."); | ||
|
||
/// <inheritdoc /> | ||
public byte[] Sign(byte[] key, byte[] bytesToSign) => | ||
throw new NotSupportedException("The None algorithm doesn't support signing."); | ||
} | ||
} | ||
throw new NotSupportedException("The None algorithm doesn't have any hash algorithm."); | ||
|
||
/// <inheritdoc /> | ||
public byte[] Sign(byte[] key, byte[] bytesToSign) => | ||
throw new NotSupportedException("The None algorithm doesn't support signing."); | ||
} | ||
} |
Oops, something went wrong.