Panda3D
encrypt_string.h
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file encrypt_string.h
10  * @author drose
11  * @date 2007-01-30
12  */
13 
14 #ifndef ENCRYPT_STRING_H
15 #define ENCRYPT_STRING_H
16 
17 #include "pandabase.h"
18 
19 #ifdef HAVE_OPENSSL
20 
21 #include "filename.h"
22 
23 BEGIN_PUBLISH
24 
25 EXPCL_PANDA_EXPRESS std::string
26 encrypt_string(const std::string &source, const std::string &password,
27  const std::string &algorithm = std::string(), int key_length = -1,
28  int iteration_count = -1);
29 EXPCL_PANDA_EXPRESS std::string
30 decrypt_string(const std::string &source, const std::string &password);
31 
32 EXPCL_PANDA_EXPRESS bool
33 encrypt_file(const Filename &source, const Filename &dest, const std::string &password,
34  const std::string &algorithm = std::string(), int key_length = -1,
35  int iteration_count = -1);
36 EXPCL_PANDA_EXPRESS bool
37 decrypt_file(const Filename &source, const Filename &dest, const std::string &password);
38 
39 EXPCL_PANDA_EXPRESS bool
40 encrypt_stream(std::istream &source, std::ostream &dest, const std::string &password,
41  const std::string &algorithm = std::string(), int key_length = -1,
42  int iteration_count = -1);
43 EXPCL_PANDA_EXPRESS bool
44 decrypt_stream(std::istream &source, std::ostream &dest, const std::string &password);
45 
46 END_PUBLISH
47 
48 #endif // HAVE_OPENSSL
49 
50 #endif
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
The name of a file, such as a texture file or an Egg file.
Definition: filename.h:39