| | 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 | | using System.Security.Cryptography; |
| | 6 | |
|
| | 7 | | namespace Microsoft.Azure.KeyVault.Cryptography |
| | 8 | | { |
| | 9 | | /// <summary> |
| | 10 | | /// An abstract Key Wrap Algorithm |
| | 11 | | /// </summary> |
| | 12 | | public abstract class KeyWrapAlgorithm : Algorithm |
| | 13 | | { |
| | 14 | | protected KeyWrapAlgorithm( string name ) |
| 18 | 15 | | : base( name ) |
| | 16 | | { |
| 18 | 17 | | } |
| | 18 | |
|
| | 19 | | /// <summary> |
| | 20 | | /// Create an encryptor for the specified key |
| | 21 | | /// </summary> |
| | 22 | | /// <param name="key">The key</param> |
| | 23 | | /// <param name="iv">The initialization vector</param> |
| | 24 | | /// <returns>An ICryptoTranform for encrypting data</returns> |
| | 25 | | public abstract ICryptoTransform CreateEncryptor( byte[] key, byte[] iv ); |
| | 26 | |
|
| | 27 | | /// <summary> |
| | 28 | | /// Create a decryptor for the specified key |
| | 29 | | /// </summary> |
| | 30 | | /// <param name="key">The key</param> |
| | 31 | | /// <param name="iv">The initialization vector</param> |
| | 32 | | /// <returns>An ICryptoTransform for decrypting data</returns> |
| | 33 | | public abstract ICryptoTransform CreateDecryptor( byte[] key, byte[] iv ); |
| | 34 | | } |
| | 35 | | } |