00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
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