Encryption.h
Go to the documentation of this file.
00001 #ifndef CASTOR_ENCRYPTION_H
00002 #define CASTOR_ENCRYPTION_H 1
00003 
00004 #include "Types.h"
00005 
00006 namespace castor { namespace spica { namespace security {
00007 
00008         typedef enum {
00009                 enc_unsupported = -1,
00010                 enc_error = 0,
00011                 enc_success = 1,
00012                 enc_unknown = 3,
00013         } EncryptResult;
00014 
00015         class EncryptService;
00016 
00017         typedef boost::shared_ptr<EncryptService> EncryptServicePtr;
00018 
00019         class EncryptService {
00020 
00021                 public:
00022 
00023                         virtual ~EncryptService() {
00024                         }
00025 
00026                         virtual BytesPtr getKey() = 0;
00027                         virtual void setKey(const BytesPtr key) = 0;
00028 
00029                         virtual int encrypt(const char *data, size_t offset, size_t count, BytesPtr &result) = 0;
00030                         virtual bool decrypt(const char *data, size_t offset, size_t count, BytesPtr &result, size_t keyStreamOffset) = 0;
00031         };
00032 
00033 } } }
00034 
00035 #endif /* CASTOR_ENCRYPTION_H */
00036 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


Castor
Author(s): Carpe Noctem
autogenerated on Fri Nov 8 2013 11:05:39