14 #ifndef ENCRYPTSTREAM_H 15 #define ENCRYPTSTREAM_H 34 class EXPCL_DTOOL_PRC IDecryptStream :
public std::istream {
36 INLINE IDecryptStream();
37 INLINE
explicit IDecryptStream(std::istream *source,
bool owns_source,
38 const std::string &password);
41 INLINE IDecryptStream(
const IDecryptStream ©) =
delete;
44 INLINE IDecryptStream &open(std::istream *source,
bool owns_source,
45 const std::string &password);
46 INLINE IDecryptStream &close();
48 INLINE
const std::string &get_algorithm()
const;
49 INLINE
int get_key_length()
const;
50 INLINE
int get_iteration_count()
const;
52 MAKE_PROPERTY(algorithm, get_algorithm);
53 MAKE_PROPERTY(key_length, get_key_length);
54 MAKE_PROPERTY(iteration_count, get_iteration_count);
57 EncryptStreamBuf _buf;
69 class EXPCL_DTOOL_PRC OEncryptStream :
public std::ostream {
71 INLINE OEncryptStream();
72 INLINE
explicit OEncryptStream(std::ostream *dest,
bool owns_dest,
73 const std::string &password);
76 INLINE OEncryptStream(
const OEncryptStream ©) =
delete;
79 INLINE OEncryptStream &open(std::ostream *dest,
bool owns_dest,
80 const std::string &password);
81 INLINE OEncryptStream &close();
84 INLINE
const std::string &get_algorithm()
const;
85 INLINE
int get_key_length()
const;
86 INLINE
int get_iteration_count()
const;
89 INLINE
void set_algorithm(
const std::string &algorithm);
90 INLINE
void set_key_length(
int key_length);
91 INLINE
void set_iteration_count(
int iteration_count);
93 MAKE_PROPERTY(algorithm, get_algorithm, set_algorithm);
94 MAKE_PROPERTY(key_length, get_key_length, set_key_length);
95 MAKE_PROPERTY(iteration_count, get_iteration_count, set_iteration_count);
98 EncryptStreamBuf _buf;
103 #endif // HAVE_OPENSSL PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.