Panda3D
|
00001 // Filename: encrypt_string.h 00002 // Created by: drose (30Jan07) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #ifndef ENCRYPT_STRING_H 00016 #define ENCRYPT_STRING_H 00017 00018 #include "pandabase.h" 00019 00020 #ifdef HAVE_OPENSSL 00021 00022 #include "filename.h" 00023 00024 BEGIN_PUBLISH 00025 00026 EXPCL_PANDAEXPRESS string 00027 encrypt_string(const string &source, const string &password, 00028 const string &algorithm = string(), int key_length = -1, 00029 int iteration_count = -1); 00030 EXPCL_PANDAEXPRESS string 00031 decrypt_string(const string &source, const string &password); 00032 00033 EXPCL_PANDAEXPRESS bool 00034 encrypt_file(const Filename &source, const Filename &dest, const string &password, 00035 const string &algorithm = string(), int key_length = -1, 00036 int iteration_count = -1); 00037 EXPCL_PANDAEXPRESS bool 00038 decrypt_file(const Filename &source, const Filename &dest, const string &password); 00039 00040 EXPCL_PANDAEXPRESS bool 00041 encrypt_stream(istream &source, ostream &dest, const string &password, 00042 const string &algorithm = string(), int key_length = -1, 00043 int iteration_count = -1); 00044 EXPCL_PANDAEXPRESS bool 00045 decrypt_stream(istream &source, ostream &dest, const string &password); 00046 00047 END_PUBLISH 00048 00049 #endif // HAVE_OPENSSL 00050 00051 #endif