| | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 2 | | // Licensed under the MIT License. See License.txt in the project root for |
| | 3 | | // license information. |
| | 4 | | // |
| | 5 | |
|
| | 6 | | namespace Microsoft.Azure.KeyVault.WebKey |
| | 7 | | { |
| | 8 | | /// <summary> |
| | 9 | | /// Supported JsonWebKey algorithms |
| | 10 | | /// </summary> |
| | 11 | | public static class JsonWebKeyEncryptionAlgorithm |
| | 12 | | { |
| | 13 | | public const string RSAOAEP = "RSA-OAEP"; |
| | 14 | | public const string RSA15 = "RSA1_5"; |
| | 15 | |
|
| | 16 | | // RSAES OAEP using SHA-256 and MGF1 with SHA-256 |
| | 17 | | // defined https://tools.ietf.org/html/draft-ietf-jose-json-web-algorithms |
| | 18 | | public const string RSAOAEP256 = "RSA-OAEP-256"; |
| | 19 | |
|
| | 20 | | /// <summary> |
| | 21 | | /// All algorithms names. Use clone to avoid FxCop violation |
| | 22 | | /// </summary> |
| | 23 | | public static string[] AllAlgorithms |
| | 24 | | { |
| 0 | 25 | | get { return (string[])_allAlgorithms.Clone(); } |
| | 26 | | } |
| | 27 | |
|
| 0 | 28 | | private static readonly string[] _allAlgorithms = { RSA15, RSAOAEP, RSAOAEP256 }; |
| | 29 | | } |
| | 30 | | } |