RMS SDK for C++  0.2.1
A client library for using Microsoft RMS from Linux.
ICryptoEngine.h
1 /*
2  * ======================================================================
3  * Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
4  * Licensed under the MIT License.
5  * See LICENSE.md in the project root for license information.
6  * ======================================================================
7 */
8 
9 #ifndef _CRYPTO_STREAMS_LIB_ICRYPTOENGINE
10 #define _CRYPTO_STREAMS_LIB_ICRYPTOENGINE
11 
12 #include <memory>
13 #include "ICryptoHash.h"
14 #include "ICryptoKey.h"
15 
16 namespace rmscrypto {
17 namespace api {
18 enum CryptoAlgorithm
19 {
20  CRYPTO_ALGORITHM_AES_ECB = 0,
21  CRYPTO_ALGORITHM_AES_CBC = 1,
22  CRYPTO_ALGORITHM_AES_CBC_PKCS7 = 2,
23 };
24 
26 public:
27 
28  virtual std::shared_ptr<ICryptoKey>CreateKey(const uint8_t *pbKey,
29  uint32_t cbKey,
30  CryptoAlgorithm algorithm) =
31  0;
32  virtual std::shared_ptr<ICryptoHash> CreateHash(CryptoHashAlgorithm algorithm) =
33  0;
34  static std::shared_ptr<ICryptoEngine>Create();
35 };
36 } // namespace api
37 } // namespace rmscrypto
38 
39 #endif // _CRYPTO_STREAMS_LIB_ICRYPTOENGINE
Definition: BlockBasedProtectedStream.cpp:13
Definition: ICryptoEngine.h:25