forked from php/pecl-php-blenc
-
Notifications
You must be signed in to change notification settings - Fork 6
/
blenc_protect.h
62 lines (57 loc) · 3.04 KB
/
blenc_protect.h
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
52
53
54
55
56
57
58
59
60
61
62
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2013 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_0.txt. |
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Author: John Coggeshall <john@php.net> |
| Giuseppe Chiesa <mail@giuseppechiesa.it> |
+----------------------------------------------------------------------+
*/
/*
* BLENC_PROTECT.H
*/
#ifndef BLENC_PROTECT_H
#define BLENC_PROTECT_H
/*
* BLENC_PROTECT_COMP3 : It's a better way to protect the expiration date into the module executable
* and preventing reverse engineering.
* With this declaration the expiration date must be into the comp3 format.
* Please see below for further informations.
*/
#define BLENC_PROTECT_COMP3
/*
* BLENC_PROTECT_MAIN_KEY : It's the encryption key used to encode the keyfile available for powerusers on the
* system. With this key hard encoded nobody could be able to decrypt the PHP sources
* protected with BLENC.
* Use a strong key!
* ex: create a strong key using apg with command
* ~$ apg -a1 -m32 -x32 -E "\\\/\""
*/
#define BLENC_PROTECT_MAIN_KEY "0123456789abcdef0123456789abcdef"
/*
* BLENC_PROTECT_EXPIRE : It's the expiration date for the module extension. After this date the module will not
* decrypt sources.
* The date must have different formats according with BLENC_PROTECT_COMP3 definition:
* - If BLENC_PROTECT_COMP3 is undefined the date must be in the format:
* GG-MM-AAAA
* (ex. 30-04-2013)
* #define BLENC_PROTECT_EXPIRE "30-04-2013"
*
*
* - If BLENC_PROTECT COMP3 id defined the date must follow the comp3 compression (stronger against
* reverse engineering techniques). The format is the following:
* { '\xAA', '\xAA', '\xMM', '\xGG' }
*
* ex. 30-04-2013 -> { '\x20', '\x13', '\x04', '\x30' }
*/
#define BLENC_PROTECT_EXPIRE { '\x99', '\x99', '\x99', '\x99' }
#endif