FS2_Open
Open source remastering of the Freespace 2 engine
encrypt.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) Volition, Inc. 1999. All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell
5  * or otherwise commercially exploit the source or things you created based on the
6  * source.
7  *
8 */
9 
10 
11 
12 #ifndef __ENCRYPT_H__
13 #define __ENCRYPT_H__
14 
15 // initialize encryption
16 void encrypt_init();
17 
18 // Return 1 if the file is encrypted, otherwise return 0
19 int is_encrypted(char *scrambled_text);
20 
21 // Returns 1 if the data uses one of the FS1 style encryptions, 0 if FS2 style
22 int is_old_encrypt(char *scrambled_text);
23 
24 // return text description of the encrypted text type
25 const char *encrypt_type(char *scrambled_text);
26 
27 // Encrypt text data
28 void encrypt(char *text, int text_len, char *scrambled_text, int *scrambled_len, int use_8bit, bool new_encrypt = true);
29 
30 // Decrypt scrambled_text
31 void unencrypt(char *scrambled_text, int scrambled_len, char *text, int *text_len);
32 
33 #endif
34 
int is_encrypted(char *scrambled_text)
Definition: encrypt.cpp:407
int is_old_encrypt(char *scrambled_text)
Definition: encrypt.cpp:421
void unencrypt(char *scrambled_text, int scrambled_len, char *text, int *text_len)
Definition: encrypt.cpp:177
void encrypt(char *text, int text_len, char *scrambled_text, int *scrambled_len, int use_8bit, bool new_encrypt=true)
Definition: encrypt.cpp:64
const char * encrypt_type(char *scrambled_text)
Definition: encrypt.cpp:435
void encrypt_init()
Definition: encrypt.cpp:453