forked from panda3d/panda3d
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathencrypt_string.h
More file actions
51 lines (40 loc) · 1.55 KB
/
encrypt_string.h
File metadata and controls
51 lines (40 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/**
* PANDA 3D SOFTWARE
* Copyright (c) Carnegie Mellon University. All rights reserved.
*
* All use of this software is subject to the terms of the revised BSD
* license. You should have received a copy of this license along
* with this source code in a file named "LICENSE."
*
* @file encrypt_string.h
* @author drose
* @date 2007-01-30
*/
#ifndef ENCRYPT_STRING_H
#define ENCRYPT_STRING_H
#include "pandabase.h"
#ifdef HAVE_OPENSSL
#include "filename.h"
#include "vector_uchar.h"
BEGIN_PUBLISH
EXPCL_PANDA_EXPRESS vector_uchar
encrypt_string(const std::string &source, const std::string &password,
const std::string &algorithm = std::string(), int key_length = -1,
int iteration_count = -1);
EXPCL_PANDA_EXPRESS std::string
decrypt_string(const vector_uchar &source, const std::string &password);
EXPCL_PANDA_EXPRESS bool
encrypt_file(const Filename &source, const Filename &dest, const std::string &password,
const std::string &algorithm = std::string(), int key_length = -1,
int iteration_count = -1);
EXPCL_PANDA_EXPRESS bool
decrypt_file(const Filename &source, const Filename &dest, const std::string &password);
EXPCL_PANDA_EXPRESS bool
encrypt_stream(std::istream &source, std::ostream &dest, const std::string &password,
const std::string &algorithm = std::string(), int key_length = -1,
int iteration_count = -1);
EXPCL_PANDA_EXPRESS bool
decrypt_stream(std::istream &source, std::ostream &dest, const std::string &password);
END_PUBLISH
#endif // HAVE_OPENSSL
#endif