-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Symmetric algorithm with Symmetric key - RSA algorithm with RSA key - EC algorithm with EC key - Password-based algorithm with Symmetric key
- Loading branch information
1 parent
bac5aa2
commit 21e338f
Showing
36 changed files
with
522 additions
and
113 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright (c) 2020 Yann Crumeyrolle. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE in the project root for license information. | ||
|
||
using JsonWebToken.Cryptography; | ||
|
||
namespace JsonWebToken | ||
{ | ||
/// <summary>Defines Elliptical Curve key management algorithm.</summary> | ||
public sealed class ECKeyManagementAlgorithm : KeyManagementAlgorithm | ||
{ | ||
/// <summary>Initializes a new instance of <see cref="ECKeyManagementAlgorithm"/>. </summary> | ||
public ECKeyManagementAlgorithm(AlgorithmId id, string name, AlgorithmCategory keyType, KeyManagementAlgorithm wrappedAlgorithm) | ||
: base(id, name, keyType, wrappedAlgorithm) | ||
{ | ||
} | ||
|
||
/// <summary>Initializes a new instance of <see cref="ECKeyManagementAlgorithm"/>. </summary> | ||
public ECKeyManagementAlgorithm(AlgorithmId id, string name, AlgorithmCategory keyType, bool produceEncryptedKey) | ||
: base(id, name, keyType, produceEncryptedKey) | ||
{ | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright (c) 2020 Yann Crumeyrolle. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE in the project root for license information. | ||
|
||
using System.Security.Cryptography; | ||
using JsonWebToken.Cryptography; | ||
|
||
namespace JsonWebToken | ||
{ | ||
/// <summary>Define an Elliptical Curve signature algorithm.</summary> | ||
public sealed class ECSignatureAlgorithm : SignatureAlgorithm | ||
{ | ||
/// <summary>Initializes a new instance of <see cref="ECSignatureAlgorithm"/>. </summary> | ||
public ECSignatureAlgorithm(AlgorithmId id, string name, AlgorithmCategory category, ushort requiredKeySizeInBits, HashAlgorithmName hashAlgorithm) : base(id, name, category, requiredKeySizeInBits, hashAlgorithm) | ||
{ | ||
} | ||
} | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright (c) 2020 Yann Crumeyrolle. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE in the project root for license information. | ||
|
||
using JsonWebToken.Cryptography; | ||
|
||
namespace JsonWebToken | ||
{ | ||
/// <summary>Defines password-based key management algorithm.</summary> | ||
public sealed class PasswordBasedKeyManagementAlgorithm : KeyManagementAlgorithm | ||
{ | ||
/// <summary>Initializes a new instance of <see cref="PasswordBasedKeyManagementAlgorithm"/>. </summary> | ||
public PasswordBasedKeyManagementAlgorithm(AlgorithmId id, string name, AlgorithmCategory keyType, KeyManagementAlgorithm wrappedAlgorithm, Sha2 sha2) | ||
: base(id, name, keyType, wrappedAlgorithm, sha2) | ||
{ | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright (c) 2020 Yann Crumeyrolle. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE in the project root for license information. | ||
|
||
using JsonWebToken.Cryptography; | ||
|
||
namespace JsonWebToken | ||
{ | ||
/// <summary>Defines RSA key management algorithm.</summary> | ||
public sealed class RsaKeyManagementAlgorithm : KeyManagementAlgorithm | ||
{ | ||
/// <summary>Initializes a new instance of <see cref="RsaKeyManagementAlgorithm"/>. </summary> | ||
public RsaKeyManagementAlgorithm(AlgorithmId id, string name, AlgorithmCategory keyType, ushort requiredKeySizeInBits) | ||
: base(id, name, keyType, requiredKeySizeInBits) | ||
{ | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright (c) 2020 Yann Crumeyrolle. All rights reserved. | ||
// Licensed under the MIT license. See LICENSE in the project root for license information. | ||
|
||
using System.Security.Cryptography; | ||
using JsonWebToken.Cryptography; | ||
|
||
namespace JsonWebToken | ||
{ | ||
/// <summary>Defines a RSA signature algorithm.</summary> | ||
public sealed class RsaSignatureAlgorithm : SignatureAlgorithm | ||
{ | ||
/// <summary>Initializes a new instance of <see cref="RsaSignatureAlgorithm"/>. </summary> | ||
public RsaSignatureAlgorithm(AlgorithmId id, string name, AlgorithmCategory category, ushort requiredKeySizeInBits, HashAlgorithmName hashAlgorithm) : base(id, name, category, requiredKeySizeInBits, hashAlgorithm) | ||
{ | ||
} | ||
} | ||
} |
Oops, something went wrong.