9 #ifndef _RMS_CRYPTO_API_H_
10 #define _RMS_CRYPTO_API_H_
14 #include "CryptoAPIExport.h"
16 #include "ICryptoProvider.h"
17 #include "ICryptoEngine.h"
22 SharedStream DLL_PUBLIC_CRYPTO CreateCryptoStream(
23 CipherMode cipherMode,
24 const std::vector<uint8_t>& key,
25 SharedStream backingStream);
31 SharedStream DLL_PUBLIC_CRYPTO CreateCryptoStreamWithAutoKey(
32 CipherMode cipherMode,
33 const std::string& csKeyName,
34 SharedStream backingStream);
36 std::shared_ptr<std::vector<uint8_t> >DLL_PUBLIC_CRYPTO EncryptWithAutoKey(
37 std::shared_ptr<std::vector<uint8_t> >pbIn,
38 CipherMode cipherMode = CIPHER_MODE_CBC4K,
39 const std::string & csKeyName =
"default");
41 std::shared_ptr<std::vector<uint8_t> >DLL_PUBLIC_CRYPTO DecryptWithAutoKey(
42 std::shared_ptr<std::vector<uint8_t> >pbIn,
43 CipherMode cipherMode = CIPHER_MODE_CBC4K,
44 const std::string & csKeyName =
"default");
46 SharedStream DLL_PUBLIC_CRYPTO CreateStreamFromStdStream(
47 std::shared_ptr<std::istream>stdIStream);
48 SharedStream DLL_PUBLIC_CRYPTO CreateStreamFromStdStream(
49 std::shared_ptr<std::ostream>stdOStream);
50 SharedStream DLL_PUBLIC_CRYPTO CreateStreamFromStdStream(
51 std::shared_ptr<std::iostream>stdIOStream);
54 std::shared_ptr<ICryptoProvider>DLL_PUBLIC_CRYPTO CreateCryptoProvider(
55 CipherMode cipherMode,
56 const std::vector<uint8_t>& key);
57 std::shared_ptr<ICryptoEngine>DLL_PUBLIC_CRYPTO CreateCryptoEngine();
60 #endif // _RMS_CRYPTO_API_H_
Definition: BlockBasedProtectedStream.cpp:13