encryption_tentacle.h

Go to the documentation of this file.
00001 #ifndef ENCRYPTION_TENTACLE_CLASS
00002 #define ENCRYPTION_TENTACLE_CLASS
00003 
00004 /*****************************************************************************\
00005 *                                                                             *
00006 *  Name   : encryption_tentacle                                               *
00007 *  Author : Chris Koeritz                                                     *
00008 *                                                                             *
00009 *******************************************************************************
00010 * Copyright (c) 2004-$now By Author.  This program is free software; you can  *
00011 * redistribute it and/or modify it under the terms of the GNU General Public  *
00012 * License as published by the Free Software Foundation; either version 2 of   *
00013 * the License or (at your option) any later version.  This is online at:      *
00014 *     http://www.fsf.org/copyleft/gpl.html                                    *
00015 * Please send any updates to: fred@gruntose.com                               *
00016 \*****************************************************************************/
00017 
00018 #ifndef OMIT_CRYPTO_SUPPORT
00019 
00020 #include "encryption_infoton.h"
00021 
00022 #include <octopus/tentacle_helper.h>
00023 
00024 // forward.
00025 class key_repository;
00026 
00028 
00040 class TENTACLES_CLASS_STYLE encryption_tentacle
00041 : public tentacle_helper<encryption_infoton>
00042 {
00043 public:
00044   encryption_tentacle();
00046 
00049   encryption_tentacle(const byte_array &rsa_key);
00051 
00055   encryption_tentacle(int key_size);
00057 
00059   virtual ~encryption_tentacle();
00060 
00061   IMPLEMENT_CLASS_NAME("encryption_tentacle");
00062 
00063   virtual outcome reconstitute(const string_array &classifier,
00064           byte_array &packed_form, infoton * &reformed);
00066 
00070   virtual outcome consume(infoton &to_chow, const octopus_request_id &item_id,
00071           byte_array &transformed);
00073 
00079   virtual void expunge(const octopus_entity &to_remove);
00081 
00082   key_repository &keys() const;
00084 
00087   const RSA_crypto &private_key() const;
00089 
00091 private:
00092   bool _server_side;  
00093   key_repository *_keys;  
00094   RSA_crypto *_rsa_private;  
00095 };
00096 
00097 #endif  // crypto support.
00098 
00099 #endif  // outer guard.
00100 

Generated on Fri Nov 28 04:29:32 2008 for HOOPLE Libraries by  doxygen 1.5.1