mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-11 06:22:44 +08:00
31 lines
449 B
C++
31 lines
449 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <boost/shared_ptr.hpp>
|
|
|
|
namespace CRYPT
|
|
{
|
|
|
|
class Crypt
|
|
{
|
|
public:
|
|
|
|
virtual void Encrypt(char* data, const size_t size) = 0;
|
|
virtual void Decrypt(char* data, const size_t size, const unsigned long stream_pos) = 0;
|
|
|
|
typedef enum
|
|
{
|
|
RC4,
|
|
RC4CryptoAPI,
|
|
XOR
|
|
} crypt_type;
|
|
|
|
virtual bool IsVerify() = 0;
|
|
|
|
};
|
|
|
|
typedef boost::shared_ptr<Crypt> CryptPtr;
|
|
|
|
|
|
} // namespace CRYPT
|