Authentication.h
Go to the documentation of this file.
00001 #ifndef CASTOR_AUTHENTICATION_H
00002 #define CASTOR_AUTHENTICATION_H 1
00003 
00004 #include "Types.h"
00005 
00006 namespace castor { namespace spica { namespace security {
00007 
00008         typedef enum {
00009                 auth_unsupported = -1,
00010                 auth_error = 0,
00011                 auth_success = 1,
00012                 auth_delayed = 2,
00013                 auth_unknown = 3,
00014         } AuthResult;
00015 
00016         class AuthService;
00017 
00018         typedef boost::shared_ptr<AuthService> AuthServicePtr;
00019 
00020         class AuthService {
00021 
00022                 public:
00023 
00024                         virtual ~AuthService() {
00025                         }
00026 
00027                         virtual AuthServicePtr create() = 0;
00028                         virtual AuthServicePtr create(const BytesPtr key) = 0;
00029 
00030                         virtual const BytesPtr getKey() = 0;
00031                         virtual void setKey(const BytesPtr key) = 0;
00032 
00033                         virtual int compute(const char *data, size_t offset, size_t count, BytesPtr &result) = 0;
00034                         virtual bool verify(const char *data, size_t offset, size_t count, const char *hash, size_t hashlen) = 0;
00035         };
00036 
00037 } } }
00038 
00039 #endif /* CASTOR_ENCRYPTION_H */
00040 
 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