15 #ifndef ENCRYPTSTREAM_H
16 #define ENCRYPTSTREAM_H
18 #include "dtoolbase.h"
23 #include "encryptStreamBuf.h"
37 class EXPCL_DTOOLCONFIG IDecryptStream :
public istream {
39 INLINE IDecryptStream();
40 INLINE IDecryptStream(istream *source,
bool owns_source,
41 const string &password);
43 INLINE IDecryptStream &open(istream *source,
bool owns_source,
44 const string &password);
45 INLINE IDecryptStream &close();
47 INLINE
const string &get_algorithm()
const;
48 INLINE
int get_key_length()
const;
49 INLINE
int get_iteration_count()
const;
52 EncryptStreamBuf _buf;
66 class EXPCL_DTOOLCONFIG OEncryptStream :
public ostream {
68 INLINE OEncryptStream();
69 INLINE OEncryptStream(ostream *dest,
bool owns_dest,
70 const string &password);
72 INLINE OEncryptStream &open(ostream *dest,
bool owns_dest,
73 const string &password);
74 INLINE OEncryptStream &close();
76 INLINE
void set_algorithm(
const string &algorithm);
77 INLINE
void set_key_length(
int key_length);
78 INLINE
void set_iteration_count(
int iteration_count);
81 EncryptStreamBuf _buf;
84 #include "encryptStream.I"
86 #endif // HAVE_OPENSSL