Completed
Push — development ( 362b6c...477849 )
by Nils
08:04
created
libraries/Authentication/TwoFactorAuth/Providers/Rng/HashRNGProvider.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 {
6 6
     private $algorithm;
7 7
     
8
-    function __construct($algorithm = 'sha256' ) {
8
+    function __construct($algorithm = 'sha256') {
9 9
         $algos = array_values(hash_algos());
10 10
         if (!in_array($algorithm, $algos, true))
11 11
             throw new RNGException('Unsupported algorithm specified');
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,8 +7,9 @@
 block discarded – undo
7 7
     
8 8
     function __construct($algorithm = 'sha256' ) {
9 9
         $algos = array_values(hash_algos());
10
-        if (!in_array($algorithm, $algos, true))
11
-            throw new RNGException('Unsupported algorithm specified');
10
+        if (!in_array($algorithm, $algos, true)) {
11
+                    throw new RNGException('Unsupported algorithm specified');
12
+        }
12 13
         $this->algorithm = $algorithm;
13 14
     }
14 15
     
Please login to merge, or discard this patch.
libraries/Authentication/TwoFactorAuth/Providers/Rng/CSRNGProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@
 block discarded – undo
6 6
 class CSRNGProvider implements IRNGProvider
7 7
 {
8 8
     public function getRandomBytes($bytecount) {
9
-        return random_bytes($bytecount);    // PHP7+
9
+        return random_bytes($bytecount); // PHP7+
10 10
     }
11 11
 
12 12
     public function isCryptographicallySecure() {
Please login to merge, or discard this patch.
libraries/Authentication/TwoFactorAuth/Providers/Rng/RNGException.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,6 +6,6 @@
 block discarded – undo
6 6
 {
7 7
     function __construct($message = "", $code = 0, $exception = null)
8 8
     {
9
-    	parent::__construct($message, $code, $exception);
9
+        parent::__construct($message, $code, $exception);
10 10
     }
11 11
 }
12 12
\ No newline at end of file
Please login to merge, or discard this patch.
includes/libraries/Authentication/TwoFactorAuth/TwoFactorAuthException.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,6 +6,6 @@
 block discarded – undo
6 6
 {
7 7
     function __construct($message = "", $code = 0, $exception = null)
8 8
     {
9
-    	parent::__construct($message, $code, $exception);
9
+        parent::__construct($message, $code, $exception);
10 10
     }
11 11
 }
12 12
\ No newline at end of file
Please login to merge, or discard this patch.
includes/libraries/Authentication/agses/axs/AXSErrorcodes.inc.php 2 patches
Indentation   +380 added lines, -380 removed lines patch added patch discarded remove patch
@@ -2,448 +2,448 @@
 block discarded – undo
2 2
 
3 3
 class AXSErrorcodes {
4 4
 	
5
-	// Global Integer Return Values used in all methods that return Integers
6
-	// and are called from the outside world (webservices, etc.)
7
-	// List of returnvalue ranges:
8
-	// x	> 0			: Positive Result (true with more infos (depending on application)
9
-	// x	== 0		: Default FALSE
10
-	// x	< 0			: Negative Result (normally false, but with more infos)
11
-	// x	== -100		: No Active Message found
12
-	// x	== -1000	: Internal Server Error, see server log for details (should not happen)
13
-	// x	< -1000		: ERROR values
14
-	
15
-	/**
16
-	 * Extract the error code contained in an ERROR string and return the code
17
-	 * @param message ERROR String received from AXS web service
18
-	 * @return error code found in ERROR message or -10000 if no error code could be found
19
-	 */
20
-	function getErrorcode($message) {
21
-		$errorcode = -10000;
22
-		if (($begin = strpos($message, "ERROR (")) === FALSE)
23
-			$begin = -1;
24
-		if (($end = strpos($message, ")")) === FALSE)
25
-			$end = -1;
5
+    // Global Integer Return Values used in all methods that return Integers
6
+    // and are called from the outside world (webservices, etc.)
7
+    // List of returnvalue ranges:
8
+    // x	> 0			: Positive Result (true with more infos (depending on application)
9
+    // x	== 0		: Default FALSE
10
+    // x	< 0			: Negative Result (normally false, but with more infos)
11
+    // x	== -100		: No Active Message found
12
+    // x	== -1000	: Internal Server Error, see server log for details (should not happen)
13
+    // x	< -1000		: ERROR values
14
+	
15
+    /**
16
+     * Extract the error code contained in an ERROR string and return the code
17
+     * @param message ERROR String received from AXS web service
18
+     * @return error code found in ERROR message or -10000 if no error code could be found
19
+     */
20
+    function getErrorcode($message) {
21
+        $errorcode = -10000;
22
+        if (($begin = strpos($message, "ERROR (")) === FALSE)
23
+            $begin = -1;
24
+        if (($end = strpos($message, ")")) === FALSE)
25
+            $end = -1;
26 26
 		
27
-		if ($begin >= 0 && $end >= 0) {
28
-			$realBegin = $begin + 7;
29
-			$errorcode = substr($message, $realBegin, $end - $realBegin);
30
-		}
31
-		return $errorcode;
32
-	}
27
+        if ($begin >= 0 && $end >= 0) {
28
+            $realBegin = $begin + 7;
29
+            $errorcode = substr($message, $realBegin, $end - $realBegin);
30
+        }
31
+        return $errorcode;
32
+    }
33 33
 
34
-	/*
34
+    /*
35 35
 	 * Reserved errors
36 36
 	 */
37
-	const RETURN_VALUE_DEFAULT_FALSE = 0;
37
+    const RETURN_VALUE_DEFAULT_FALSE = 0;
38 38
 
39
-	const ERROR_HEDGEID_WRONG = -1;
40
-	const ERROR_RESPONSE_NOT_VALID_ANYMORE = -2;
41
-	const ERROR_RESPONSE_VERFICATION_FAILED_MORE_TRY_LEFT = -3;
42
-	const ERROR_RESPONSE_MAX_TRIES_REACHED = -4;
43
-	
44
-	const ERROR_RESPONSE_WITHOUT_MESSAGE = -100;
45
-	const ERROR_RESPONSE_NULL = -101;
46
-	const ERROR_HEDGEID_NULL = -102;
47
-	const ERROR_RESPONSE_EMPTY = -103;
48
-	const ERROR_HEDGEID_EMPTY = -104;
49
-	
50
-	/*
39
+    const ERROR_HEDGEID_WRONG = -1;
40
+    const ERROR_RESPONSE_NOT_VALID_ANYMORE = -2;
41
+    const ERROR_RESPONSE_VERFICATION_FAILED_MORE_TRY_LEFT = -3;
42
+    const ERROR_RESPONSE_MAX_TRIES_REACHED = -4;
43
+	
44
+    const ERROR_RESPONSE_WITHOUT_MESSAGE = -100;
45
+    const ERROR_RESPONSE_NULL = -101;
46
+    const ERROR_HEDGEID_NULL = -102;
47
+    const ERROR_RESPONSE_EMPTY = -103;
48
+    const ERROR_HEDGEID_EMPTY = -104;
49
+	
50
+    /*
51 51
 	 * Token errors (-1001 to -1099)
52 52
 	 */
53
-	const ERROR_TOKEN_NOT_FOUND = -1001;
54
-	const ERROR_TOKEN_LOCKED = -1002;
55
-	const ERROR_TOKEN_DOES_NOT_SUPPORT_APPLICATION = -1003;
56
-	const ERROR_TOKEN_EXPORT = -1004;
57
-	const ERROR_TOKEN_REMOVE = -1005;
58
-	const ERROR_TOKEN_READY_FOR_PRODUCTIONLOT_NOT_FOUND = -1006;
59
-	const ERROR_TOKEN_NOT_IN_PRODUCTION_STATE = -1007;
60
-	const ERROR_TOKEN_TYPE_NOT_FOUND = -1008;
61
-	const ERROR_TOKEN_WRONG_STATE = -1009;
62
-	const ERROR_TOKEN_BRLC_NOT_FOUND = -1010;
63
-	const ERROR_TOKEN_ASSIGN_SAME_SERIAL_NUMBER_TO_OTHER_TOKEN = -1011;
64
-	const ERROR_TOKEN_SERIAL_NUMBER_ALREADY_ASSIGNED = -1012;
65
-	const ERROR_TOKEN_UNLOCK_COUNTER_MAXIMUM_REACHED = -1013;
66
-	const ERROR_TOKEN_REVOKED = -1014;
67
-	const ERROR_TOKEN_DOES_NOT_SUPPORT_BRANDING = -1015;
68
-	const ERROR_TOKEN_TO_DELETE_IN_WRONG_STATE = -1016;
69
-	
70
-	const ERROR_DR_TOKENENTITY_NOT_FOUND = -1025;
71
-	
72
-	// ERROR if the token could not be found on the local server
73
-	// (automatic key fetching not enabled)
74
-	const ERROR_TOKEN_NOT_FOUND_NO_KEYFETCHING = -1051;
75
-	const ERROR_TOKEN_NOT_FOUND_KEYFETCHING_TEMPORARY_NOT_AVAILABLE = -1052;
76
-	
77
-	/*
53
+    const ERROR_TOKEN_NOT_FOUND = -1001;
54
+    const ERROR_TOKEN_LOCKED = -1002;
55
+    const ERROR_TOKEN_DOES_NOT_SUPPORT_APPLICATION = -1003;
56
+    const ERROR_TOKEN_EXPORT = -1004;
57
+    const ERROR_TOKEN_REMOVE = -1005;
58
+    const ERROR_TOKEN_READY_FOR_PRODUCTIONLOT_NOT_FOUND = -1006;
59
+    const ERROR_TOKEN_NOT_IN_PRODUCTION_STATE = -1007;
60
+    const ERROR_TOKEN_TYPE_NOT_FOUND = -1008;
61
+    const ERROR_TOKEN_WRONG_STATE = -1009;
62
+    const ERROR_TOKEN_BRLC_NOT_FOUND = -1010;
63
+    const ERROR_TOKEN_ASSIGN_SAME_SERIAL_NUMBER_TO_OTHER_TOKEN = -1011;
64
+    const ERROR_TOKEN_SERIAL_NUMBER_ALREADY_ASSIGNED = -1012;
65
+    const ERROR_TOKEN_UNLOCK_COUNTER_MAXIMUM_REACHED = -1013;
66
+    const ERROR_TOKEN_REVOKED = -1014;
67
+    const ERROR_TOKEN_DOES_NOT_SUPPORT_BRANDING = -1015;
68
+    const ERROR_TOKEN_TO_DELETE_IN_WRONG_STATE = -1016;
69
+	
70
+    const ERROR_DR_TOKENENTITY_NOT_FOUND = -1025;
71
+	
72
+    // ERROR if the token could not be found on the local server
73
+    // (automatic key fetching not enabled)
74
+    const ERROR_TOKEN_NOT_FOUND_NO_KEYFETCHING = -1051;
75
+    const ERROR_TOKEN_NOT_FOUND_KEYFETCHING_TEMPORARY_NOT_AVAILABLE = -1052;
76
+	
77
+    /*
78 78
 	 * Key errors (-1100 to -1199)
79 79
 	 */
80
-	const ERROR_KEY_NOT_FOUND = -1100;
81
-	const ERROR_NO_UNASSIGNED_KEY_FOUND = -1101;
82
-	const ERROR_ISSUER_KEY_NOT_FOUND = -1102;
83
-	const ERROR_KEY_NOT_UPDATED = -1103;
84
-	/* removed 2008-11-13 - smm	
80
+    const ERROR_KEY_NOT_FOUND = -1100;
81
+    const ERROR_NO_UNASSIGNED_KEY_FOUND = -1101;
82
+    const ERROR_ISSUER_KEY_NOT_FOUND = -1102;
83
+    const ERROR_KEY_NOT_UPDATED = -1103;
84
+    /* removed 2008-11-13 - smm	
85 85
 	 * The error does not occur anymore
86 86
 	 * const ERROR_KEY_FOR_KEYLOADING_NOT_CREATED = -1104;
87 87
 	 */
88
-	const ERROR_REEXPORT_KEYS_ON_NORMAL_AXS_AS = -1105;
89
-	const ERROR_NUMBER_OF_KEYS_OUT_OF_BOUNDS = -1106;
90
-	const ERROR_COULD_NOT_FIND_NUMBER_OF_KEYS = -1107;
91
-	const ERROR_CANNOT_ASSIGN_AXS_EXCLUSIVE_KEY_TO_AA = -1108;
92
-	const ERROR_TEMPORARY_KEY_NOT_CALCULATED = -1109;
93
-	const ERROR_SM_NOT_AUTHORIZED_TO_RECEIVE_FMS_KEY = -1110;
94
-	const ERROR_NOT_AUTHORIZED_TO_DELETE_KEY = -1111;
95
-	const ERROR_CANNOT_FORCE_KEY_DELETION = -1112;
96
-	// the key is locked, introduced in V2.20.00
97
-	const ERROR_KEY_LOCKED = -1113;
98
-	// non-expiring key errors, introduced in V2.20.00
99
-	const ERROR_NON_EXPIRING_KEY_NOT_FOUND = -1114;
100
-	const ERROR_NON_EXPIRING_KEY_NOT_READY_TWO_ADDITIONAL_AUTHENTICATIONS_NEEDED = -1115;
101
-	const ERROR_NON_EXPIRING_KEY_NOT_READY_ONE_ADDITIONAL_AUTHENTICATION_NEEDED = -1116;
102
-	
103
-	// ERROR if no free key is available on the local server and
104
-	// the automatic key fetching is not enabled
105
-	const ERROR_NO_UNASSIGNED_KEY_FOUND_NO_KEYFETCHING = -1151;
106
-	const ERROR_KEY_NOT_FOUND_KEYFETCHING_TEMPORARY_NOT_AVAILABLE = -1152;
107
-	
108
-	
109
-	/*
88
+    const ERROR_REEXPORT_KEYS_ON_NORMAL_AXS_AS = -1105;
89
+    const ERROR_NUMBER_OF_KEYS_OUT_OF_BOUNDS = -1106;
90
+    const ERROR_COULD_NOT_FIND_NUMBER_OF_KEYS = -1107;
91
+    const ERROR_CANNOT_ASSIGN_AXS_EXCLUSIVE_KEY_TO_AA = -1108;
92
+    const ERROR_TEMPORARY_KEY_NOT_CALCULATED = -1109;
93
+    const ERROR_SM_NOT_AUTHORIZED_TO_RECEIVE_FMS_KEY = -1110;
94
+    const ERROR_NOT_AUTHORIZED_TO_DELETE_KEY = -1111;
95
+    const ERROR_CANNOT_FORCE_KEY_DELETION = -1112;
96
+    // the key is locked, introduced in V2.20.00
97
+    const ERROR_KEY_LOCKED = -1113;
98
+    // non-expiring key errors, introduced in V2.20.00
99
+    const ERROR_NON_EXPIRING_KEY_NOT_FOUND = -1114;
100
+    const ERROR_NON_EXPIRING_KEY_NOT_READY_TWO_ADDITIONAL_AUTHENTICATIONS_NEEDED = -1115;
101
+    const ERROR_NON_EXPIRING_KEY_NOT_READY_ONE_ADDITIONAL_AUTHENTICATION_NEEDED = -1116;
102
+	
103
+    // ERROR if no free key is available on the local server and
104
+    // the automatic key fetching is not enabled
105
+    const ERROR_NO_UNASSIGNED_KEY_FOUND_NO_KEYFETCHING = -1151;
106
+    const ERROR_KEY_NOT_FOUND_KEYFETCHING_TEMPORARY_NOT_AVAILABLE = -1152;
107
+	
108
+	
109
+    /*
110 110
 	 * Firmware errors (-1200 to -1299)
111 111
 	 */
112
-	const ERROR_FW_NOT_FOUND = -1200;
113
-	const ERROR_FW_SUCCESSOR_NOT_FOUND = -1201;
114
-	const ERROR_FW_INITIAL_KEY_NOT_FOUND = -1202;
115
-	const ERROR_FW_INITIAL_KEY_NOT_HEX = -1203;
116
-	const ERROR_FW_INITIAL_KEY_INCORRECT_LENGTH = -1204;
117
-	const ERROR_FW_ACTUAL_VERSION_NULL = -1205;
118
-	const ERROR_FW_ACTUAL_VERSION_EMPTY = -1206;
119
-	const ERROR_FW_VERSION_NOT_VALID = -1207;
120
-	const ERROR_FW_ENCRYPTED_FIRMWARE_URL_NOT_SET = -1208;
121
-	const ERROR_FW_ANCESTOR_ALREADY_HAS_SUCCESSOR = -1209;
122
-	const ERROR_FW_UPDATE_SEED_NOT_SET = -1210;
112
+    const ERROR_FW_NOT_FOUND = -1200;
113
+    const ERROR_FW_SUCCESSOR_NOT_FOUND = -1201;
114
+    const ERROR_FW_INITIAL_KEY_NOT_FOUND = -1202;
115
+    const ERROR_FW_INITIAL_KEY_NOT_HEX = -1203;
116
+    const ERROR_FW_INITIAL_KEY_INCORRECT_LENGTH = -1204;
117
+    const ERROR_FW_ACTUAL_VERSION_NULL = -1205;
118
+    const ERROR_FW_ACTUAL_VERSION_EMPTY = -1206;
119
+    const ERROR_FW_VERSION_NOT_VALID = -1207;
120
+    const ERROR_FW_ENCRYPTED_FIRMWARE_URL_NOT_SET = -1208;
121
+    const ERROR_FW_ANCESTOR_ALREADY_HAS_SUCCESSOR = -1209;
122
+    const ERROR_FW_UPDATE_SEED_NOT_SET = -1210;
123 123
 
124
-	/*
124
+    /*
125 125
 	 * AA errors (-1300 to -1399)
126 126
 	 */
127
-	const ERROR_AA_NOT_FOUND = -1300;
128
-	const ERROR_AA_NOT_TOKEN_ISSUER = -1301;
129
-	const ERROR_AA_DOES_NOT_OWN_BRANDING = -1302;
130
-	const ERROR_AA_NO_ENROLMENT_RIGHT = -1303;
131
-	const ERROR_AA_DOES_NOT_MEET_MIN_ENROLMENT_TYPE = -1304;
132
-	const ERROR_AA_SIGNATURE_NOT_VERIFIED = -1305;
133
-	const ERROR_AA_SIGNATURE_NULL_OR_EMPTY = -1306;
134
-	const ERROR_AA_SIGNATURE_DATA_NOT_SET_OR_EMPTY = -1307;
135
-	const ERROR_AA_BRANDINGID_NULL = -1308;
136
-	const ERROR_AA_BRANDINGID_EMPTY = -1309;
137
-	const ERROR_AA_BRANDINGID_TOO_SHORT = -1310;
138
-	const ERROR_AA_BRANDINGID_TOO_LONG = -1311;
139
-	const ERROR_AA_BRANDINGID_NOT_NUMBER = -1312;
140
-	const ERROR_AA_NAME_NULL = -1313;
141
-	const ERROR_AA_NAME_EMPTY = -1314;
142
-	const ERROR_AA_NAME_TOO_SHORT = -1315;
143
-	const ERROR_AA_NAME_TOO_LONG = -1316;
144
-	const ERROR_AA_BRANDINGID_NOT_HEX = -1317;
145
-	const ERROR_IL_NOT_AUTHORIZED_TO_IMPORT_BLC = -1318;
127
+    const ERROR_AA_NOT_FOUND = -1300;
128
+    const ERROR_AA_NOT_TOKEN_ISSUER = -1301;
129
+    const ERROR_AA_DOES_NOT_OWN_BRANDING = -1302;
130
+    const ERROR_AA_NO_ENROLMENT_RIGHT = -1303;
131
+    const ERROR_AA_DOES_NOT_MEET_MIN_ENROLMENT_TYPE = -1304;
132
+    const ERROR_AA_SIGNATURE_NOT_VERIFIED = -1305;
133
+    const ERROR_AA_SIGNATURE_NULL_OR_EMPTY = -1306;
134
+    const ERROR_AA_SIGNATURE_DATA_NOT_SET_OR_EMPTY = -1307;
135
+    const ERROR_AA_BRANDINGID_NULL = -1308;
136
+    const ERROR_AA_BRANDINGID_EMPTY = -1309;
137
+    const ERROR_AA_BRANDINGID_TOO_SHORT = -1310;
138
+    const ERROR_AA_BRANDINGID_TOO_LONG = -1311;
139
+    const ERROR_AA_BRANDINGID_NOT_NUMBER = -1312;
140
+    const ERROR_AA_NAME_NULL = -1313;
141
+    const ERROR_AA_NAME_EMPTY = -1314;
142
+    const ERROR_AA_NAME_TOO_SHORT = -1315;
143
+    const ERROR_AA_NAME_TOO_LONG = -1316;
144
+    const ERROR_AA_BRANDINGID_NOT_HEX = -1317;
145
+    const ERROR_IL_NOT_AUTHORIZED_TO_IMPORT_BLC = -1318;
146 146
 		
147
-	/*
147
+    /*
148 148
 	 * Branding errors (-1400 to -1499)
149 149
 	 */
150
-	const ERROR_BRANDING_NOT_FOUND = -1400;
151
-	const ERROR_BRANDING_EMPTY = -1401;
152
-	const ERROR_BRANDING_INCOMPLETE = -1402;
153
-	const ERROR_BRANDING_ALREADY_EXIST = -1403;
154
-	const ERROR_BRANDING_LOADING_NOT_CONFIRMED = -1404;
155
-	const ERROR_BRANDING_SIGNATURE_NOT_VERIFIED = -1405;
156
-	const ERROR_BRANDING_SIGNATURE_NOT_HEX = -1406;
157
-	const ERROR_BRANDING_SIGNATURE_NOT_CALCULATED = -1407;
158
-	const ERROR_BRANDINGID_NULL = -1408;
159
-	const ERROR_BRANDINGID_EMPTY = -1409;
160
-	const ERROR_BRANDINGID_TOO_SHORT = -1410;
161
-	const ERROR_BRANDINGID_TOO_LONG = -1411;
162
-	const ERROR_BRANDINGID_NOT_NUMBER = -1412;
163
-	const ERROR_BRANDING_NAME_NULL = -1413;
164
-	const ERROR_BRANDING_NAME_EMPTY = -1414;
165
-	const ERROR_BRANDING_NAME_TOO_SHORT = -1415;
166
-	const ERROR_BRANDING_NAME_TOO_LONG = -1416;
167
-	const ERROR_BRANDING_TYPE_UNKNOWN = -1417;
168
-	const ERROR_POWER_BRANDING_NOT_FOUND = -1418;
169
-	// error for new branding (version 2) - 10.03.09 crohr
170
-	const ERROR_KBIN_NOT_SET = -1430;
171
-	const ERROR_KBIN_LENGTH_NOT_CORRECT = -1431;
172
-	const ERROR_BRDIG_NOT_VERIFIED = -1432;
173
-	const ERROR_BISC_NOT_VERIFIED = -1433;
174
-	const ERROR_CSS_NOT_VERIFIED = -1434;
175
-	const ERROR_ILN_NOT_VERIFIED = -1435;
176
-	const ERROR_CSS_INCOMPLETE = -1436;
177
-	const ERROR_CSS_EMPTY = -1437;
178
-	const ERROR_CSS_SIGNATURE_NOT_VERIFIED = -1438;
179
-	const ERROR_BRDIG_SIGNATURE_NOT_VERIFIED = -1439;
180
-	const ERROR_BRDIG_SIGNATURE_NOT_HEX = -1440;
181
-	const ERROR_BRANDINGID_NOT_HEX = -1441;
182
-	const ERROR_OID_LENGTH_NOT_CORRECT = -1442;
183
-	// the CSS was created for another system (production, enterprise, evaluation, ...)
184
-	const ERROR_CSS_BELONGS_TO_OTHER_SYSTEM = -1443;
185
-	// the systemtype in the kbin is not the same as the one in the CSS
186
-	const ERROR_KBIN_FOR_OTHER_SYSTEM_THAN_CSS = -1444;
187
-	
188
-	/*
150
+    const ERROR_BRANDING_NOT_FOUND = -1400;
151
+    const ERROR_BRANDING_EMPTY = -1401;
152
+    const ERROR_BRANDING_INCOMPLETE = -1402;
153
+    const ERROR_BRANDING_ALREADY_EXIST = -1403;
154
+    const ERROR_BRANDING_LOADING_NOT_CONFIRMED = -1404;
155
+    const ERROR_BRANDING_SIGNATURE_NOT_VERIFIED = -1405;
156
+    const ERROR_BRANDING_SIGNATURE_NOT_HEX = -1406;
157
+    const ERROR_BRANDING_SIGNATURE_NOT_CALCULATED = -1407;
158
+    const ERROR_BRANDINGID_NULL = -1408;
159
+    const ERROR_BRANDINGID_EMPTY = -1409;
160
+    const ERROR_BRANDINGID_TOO_SHORT = -1410;
161
+    const ERROR_BRANDINGID_TOO_LONG = -1411;
162
+    const ERROR_BRANDINGID_NOT_NUMBER = -1412;
163
+    const ERROR_BRANDING_NAME_NULL = -1413;
164
+    const ERROR_BRANDING_NAME_EMPTY = -1414;
165
+    const ERROR_BRANDING_NAME_TOO_SHORT = -1415;
166
+    const ERROR_BRANDING_NAME_TOO_LONG = -1416;
167
+    const ERROR_BRANDING_TYPE_UNKNOWN = -1417;
168
+    const ERROR_POWER_BRANDING_NOT_FOUND = -1418;
169
+    // error for new branding (version 2) - 10.03.09 crohr
170
+    const ERROR_KBIN_NOT_SET = -1430;
171
+    const ERROR_KBIN_LENGTH_NOT_CORRECT = -1431;
172
+    const ERROR_BRDIG_NOT_VERIFIED = -1432;
173
+    const ERROR_BISC_NOT_VERIFIED = -1433;
174
+    const ERROR_CSS_NOT_VERIFIED = -1434;
175
+    const ERROR_ILN_NOT_VERIFIED = -1435;
176
+    const ERROR_CSS_INCOMPLETE = -1436;
177
+    const ERROR_CSS_EMPTY = -1437;
178
+    const ERROR_CSS_SIGNATURE_NOT_VERIFIED = -1438;
179
+    const ERROR_BRDIG_SIGNATURE_NOT_VERIFIED = -1439;
180
+    const ERROR_BRDIG_SIGNATURE_NOT_HEX = -1440;
181
+    const ERROR_BRANDINGID_NOT_HEX = -1441;
182
+    const ERROR_OID_LENGTH_NOT_CORRECT = -1442;
183
+    // the CSS was created for another system (production, enterprise, evaluation, ...)
184
+    const ERROR_CSS_BELONGS_TO_OTHER_SYSTEM = -1443;
185
+    // the systemtype in the kbin is not the same as the one in the CSS
186
+    const ERROR_KBIN_FOR_OTHER_SYSTEM_THAN_CSS = -1444;
187
+	
188
+    /*
189 189
 	 * Property errors (-1600 to -1699)
190 190
 	 */
191
-	const ERROR_PROPERTY_NOT_NUMBER = -1600;
192
-	const ERROR_PROPERTY_NOT_SET = -1601;
193
-	const ERROR_PROPERTY_VALUE_NOT_VALID = -1602;
191
+    const ERROR_PROPERTY_NOT_NUMBER = -1600;
192
+    const ERROR_PROPERTY_NOT_SET = -1601;
193
+    const ERROR_PROPERTY_VALUE_NOT_VALID = -1602;
194 194
 	
195
-	/*
195
+    /*
196 196
 	 * platform errors (-1700 to -1799)
197 197
 	 */
198
-	const ERROR_PLATFORM_OPERATOR_NOT_SET = -1700;
199
-	const ERROR_PLATFORMID_NULL = -1701;
200
-	const ERROR_PLATFORMID_EMPTY = -1702;
201
-	const ERROR_PLATFORMID_NOT_NUMBER = -1703;
202
-	const ERROR_PLATFORMID_TOO_SHORT = -1704;
203
-	const ERROR_PLATFORMID_TOO_LONG = -1705;
204
-	const ERROR_PLATFORM_NAME_NULL = -1706;
205
-	const ERROR_PLATFORM_NAME_EMPTY = -1707;
206
-	const ERROR_PLATFORM_NAME_TOO_SHORT = -1708;
207
-	const ERROR_PLATFORM_NAME_TOO_LONG = -1709;
208
-	const ERROR_PLATFORMID_LENGTH_NOT_CORRECT = -1710;
209
-	const ERROR_PLATFORMID_NOT_HEX = -1711;
210
-	
211
-	/*
198
+    const ERROR_PLATFORM_OPERATOR_NOT_SET = -1700;
199
+    const ERROR_PLATFORMID_NULL = -1701;
200
+    const ERROR_PLATFORMID_EMPTY = -1702;
201
+    const ERROR_PLATFORMID_NOT_NUMBER = -1703;
202
+    const ERROR_PLATFORMID_TOO_SHORT = -1704;
203
+    const ERROR_PLATFORMID_TOO_LONG = -1705;
204
+    const ERROR_PLATFORM_NAME_NULL = -1706;
205
+    const ERROR_PLATFORM_NAME_EMPTY = -1707;
206
+    const ERROR_PLATFORM_NAME_TOO_SHORT = -1708;
207
+    const ERROR_PLATFORM_NAME_TOO_LONG = -1709;
208
+    const ERROR_PLATFORMID_LENGTH_NOT_CORRECT = -1710;
209
+    const ERROR_PLATFORMID_NOT_HEX = -1711;
210
+	
211
+    /*
212 212
 	 * XML errors (-1800 to -1899)
213 213
 	 */
214
-	const ERROR_XML_DATA_NOT_EXPORTED = -1800;
215
-	const ERROR_XML_DATA_NOT_PARSED = -1801;
216
-	const ERROR_XML_DATA_NOT_IMPORTED = -1802;
217
-	const ERROR_XML_DATA_NULL = -1803;
218
-	const ERROR_XML_DATA_EMPTY = -1804;
214
+    const ERROR_XML_DATA_NOT_EXPORTED = -1800;
215
+    const ERROR_XML_DATA_NOT_PARSED = -1801;
216
+    const ERROR_XML_DATA_NOT_IMPORTED = -1802;
217
+    const ERROR_XML_DATA_NULL = -1803;
218
+    const ERROR_XML_DATA_EMPTY = -1804;
219 219
 
220
-	/*
220
+    /*
221 221
 	 * TCS errors (-1900 to -1999)
222 222
 	 */
223
-	const ERROR_TCS_FILE_NOT_ENCRYPTED = -1900;
224
-	const ERROR_TCS_FILE_SIGNATURE_NOT_CREATED = -1901;
225
-	const ERROR_TCS_FILE_NOT_READABLE = -1902;
226
-	const ERROR_TCS_FILE_STRUCTURE_NOT_VALID = -1903;
227
-	const ERROR_TCS_SIGNATURE_NOT_VERIFIED = -1904;
228
-	const ERROR_TCS_SIGNATURE_NOT_VERIFIED_DATA_NOT_VALID = -1905;
229
-	const ERROR_TCS_SIGNATURE_NOT_VERIFIED_CERTIFICATE_NOT_USABLE = -1906;
230
-	const ERROR_TCS_SIGNATURE_NOT_VERIFIED_SIGNATURE_ALGORITHM_NOT_AVAILABLE = -1907;
231
-	const ERROR_TCS_DATA_ENCRYPTION_ALGORITHM_NOT_AVAILABLE = -1908;
232
-	const ERROR_TCS_DATA_NOT_IMPORTED = -1909;
233
-	const ERROR_TCS_DATA_PRIVATE_KEY_INVALID = -1910;
234
-	
235
-	/*
223
+    const ERROR_TCS_FILE_NOT_ENCRYPTED = -1900;
224
+    const ERROR_TCS_FILE_SIGNATURE_NOT_CREATED = -1901;
225
+    const ERROR_TCS_FILE_NOT_READABLE = -1902;
226
+    const ERROR_TCS_FILE_STRUCTURE_NOT_VALID = -1903;
227
+    const ERROR_TCS_SIGNATURE_NOT_VERIFIED = -1904;
228
+    const ERROR_TCS_SIGNATURE_NOT_VERIFIED_DATA_NOT_VALID = -1905;
229
+    const ERROR_TCS_SIGNATURE_NOT_VERIFIED_CERTIFICATE_NOT_USABLE = -1906;
230
+    const ERROR_TCS_SIGNATURE_NOT_VERIFIED_SIGNATURE_ALGORITHM_NOT_AVAILABLE = -1907;
231
+    const ERROR_TCS_DATA_ENCRYPTION_ALGORITHM_NOT_AVAILABLE = -1908;
232
+    const ERROR_TCS_DATA_NOT_IMPORTED = -1909;
233
+    const ERROR_TCS_DATA_PRIVATE_KEY_INVALID = -1910;
234
+	
235
+    /*
236 236
 	 * Production lot errors (-2000 to -2099)
237 237
 	 */
238
-	const ERROR_PRODUCTION_LOT_NOT_FOUND = -2000;
239
-	const ERROR_LOT_NUMBER_NEGATIVE = -2001;
240
-	const ERROR_LOT_NUMBER_ALREADY_EXISTS = -2002;
238
+    const ERROR_PRODUCTION_LOT_NOT_FOUND = -2000;
239
+    const ERROR_LOT_NUMBER_NEGATIVE = -2001;
240
+    const ERROR_LOT_NUMBER_ALREADY_EXISTS = -2002;
241 241
 			
242
-	/*
242
+    /*
243 243
 	 *  Keystore and TPS errors (-2100 to -2199)
244 244
 	 */
245
-	const ERROR_KEYSTORE_NOT_FOUND = -2100;
246
-	const ERROR_KEYSTORE_LOCATION_NOT_SET_OR_EMPTY = -2101;
247
-	const ERROR_KEYSTORE_PASSWORD_NOT_SET_OR_EMPTY = -2102;
248
-	const ERROR_KEYSTORE_NOT_LOADED = -2103;
249
-	const ERROR_KEYSTORE_KEY_NOT_LOADED = -2104;
250
-	const ERROR_AXS_CERTIFICATE_NOT_FOUND = -2105;
251
-	const ERROR_COULD_NOT_GET_CERTIFICATE = -2106;
252
-	const ERROR_COULD_NOT_GET_PUBLIC_KEY = -2107;
253
-	const ERROR_TPS_KEY_NOT_LOADED_FROM_KEYSTORE = -2108;
254
-	const ERROR_TPS_CERTIFICATE_NOT_LOADED_FROM_KEYSTORE = -2109;
255
-	const ERROR_TPS_SERVER_CONNECTION = -2110;
256
-	const ERROR_TPS_KEY_NOT_EXPORTED = -2111;
257
-	const ERROR_TPS_OTBLC_NOT_CREATED = -2112;
245
+    const ERROR_KEYSTORE_NOT_FOUND = -2100;
246
+    const ERROR_KEYSTORE_LOCATION_NOT_SET_OR_EMPTY = -2101;
247
+    const ERROR_KEYSTORE_PASSWORD_NOT_SET_OR_EMPTY = -2102;
248
+    const ERROR_KEYSTORE_NOT_LOADED = -2103;
249
+    const ERROR_KEYSTORE_KEY_NOT_LOADED = -2104;
250
+    const ERROR_AXS_CERTIFICATE_NOT_FOUND = -2105;
251
+    const ERROR_COULD_NOT_GET_CERTIFICATE = -2106;
252
+    const ERROR_COULD_NOT_GET_PUBLIC_KEY = -2107;
253
+    const ERROR_TPS_KEY_NOT_LOADED_FROM_KEYSTORE = -2108;
254
+    const ERROR_TPS_CERTIFICATE_NOT_LOADED_FROM_KEYSTORE = -2109;
255
+    const ERROR_TPS_SERVER_CONNECTION = -2110;
256
+    const ERROR_TPS_KEY_NOT_EXPORTED = -2111;
257
+    const ERROR_TPS_OTBLC_NOT_CREATED = -2112;
258 258
 
259
-	/*
259
+    /*
260 260
 	 * Data errors (-2200 to -2399)
261 261
 	 */
262 262
 	
263
-	// Codebook errors
264
-	const ERROR_CODEBOOK_ENTRY_NOT_FOUND = -2200;
265
-	const ERROR_CODEBOOK_NUMBER_OF_ENTRIES_DO_NOT_MATCH = -2201;
266
-	const ERROR_CODEBOOK_ENTRY_LENGTH_NOT_VALID = -2202;
263
+    // Codebook errors
264
+    const ERROR_CODEBOOK_ENTRY_NOT_FOUND = -2200;
265
+    const ERROR_CODEBOOK_NUMBER_OF_ENTRIES_DO_NOT_MATCH = -2201;
266
+    const ERROR_CODEBOOK_ENTRY_LENGTH_NOT_VALID = -2202;
267 267
 		
268
-	// FingerCode errors
269
-	const ERROR_FINGERCODE_NULL = -2210;
270
-	const ERROR_FINGERCODE_TOO_SHORT = -2211;
271
-	const ERROR_FINGERCODE_TOO_LONG = -2212;
272
-	const ERROR_FINGERCODE_INVALID_SYMBOLS = -2213;
273
-	const ERROR_FINGERCODE_CHAR_REPETITION = -2214;
274
-	const ERROR_FINGERCODE_VIOLATES_DOMAIN = -2215;
275
-	
276
-	// PIN errors
277
-	const ERROR_PIN_LENGTH_OUT_OF_BOUNDS = -2220;
278
-	const ERROR_PIN_LENGTH_FINGERCODE_NOT_SET = -2221;
279
-	
280
-	// Text payload errors
281
-	const ERROR_TEXT_PAYLOAD_NULL = -2230;
282
-	const ERROR_TEXT_PAYLOAD_EMPTY = -2231;
283
-	const ERROR_TEXT_PAYLOAD_TOO_LONG = -2232;
284
-	const ERROR_TEXT_CONTAINS_NON_DISPLAYABLE_CHARACTER = -2233;
285
-	const ERROR_TEXT_TOO_MANY_LINES = -2234;
286
-	
287
-	// AclRequested errors
288
-	const ERROR_ACL_REQUESTED_NULL = -2250;
289
-	const ERROR_ACL_REQUESTED_EMPTY = -2251;
290
-	const ERROR_ACL_REQUESTED_TOO_SHORT = -2252;
291
-	const ERROR_ACL_REQUESTED_TOO_LONG = -2253;
292
-	const ERROR_ACL_REQUESTED_NOT_HEX = -2254;
293
-	
294
-	// Description errors
295
-	const ERROR_DESCRIPTION_TOO_LONG = -2270;
296
-	
297
-	// Data errors
298
-	const ERROR_DATA_NULL = -2280;
299
-	const ERROR_DATA_EMPTY = -2281;
300
-	const ERROR_DATA_TOO_LONG = -2282;
301
-	const ERROR_DATA_NOT_HEX = -2283;
302
-	
303
-	// AuthenticationLevel error
304
-	const ERROR_AUTHENTICATION_LEVEL_OUT_OF_BOUNDS = -2290;
305
-	
306
-	// ReturnPath error
307
-	const ERROR_RETURN_PATH_OUT_OF_BOUNDS = -2300;
308
-	
309
-	// min_aut_lev error
310
-	const ERROR_MIN_AUT_LEV_OUT_OF_BOUNDS = -2310;
311
-	
312
-	// HexData errors
313
-	const ERROR_HEX_DATA_NULL = -2320;
314
-	const ERROR_HEX_DATA_NOT_HEX = -2321;
268
+    // FingerCode errors
269
+    const ERROR_FINGERCODE_NULL = -2210;
270
+    const ERROR_FINGERCODE_TOO_SHORT = -2211;
271
+    const ERROR_FINGERCODE_TOO_LONG = -2212;
272
+    const ERROR_FINGERCODE_INVALID_SYMBOLS = -2213;
273
+    const ERROR_FINGERCODE_CHAR_REPETITION = -2214;
274
+    const ERROR_FINGERCODE_VIOLATES_DOMAIN = -2215;
275
+	
276
+    // PIN errors
277
+    const ERROR_PIN_LENGTH_OUT_OF_BOUNDS = -2220;
278
+    const ERROR_PIN_LENGTH_FINGERCODE_NOT_SET = -2221;
279
+	
280
+    // Text payload errors
281
+    const ERROR_TEXT_PAYLOAD_NULL = -2230;
282
+    const ERROR_TEXT_PAYLOAD_EMPTY = -2231;
283
+    const ERROR_TEXT_PAYLOAD_TOO_LONG = -2232;
284
+    const ERROR_TEXT_CONTAINS_NON_DISPLAYABLE_CHARACTER = -2233;
285
+    const ERROR_TEXT_TOO_MANY_LINES = -2234;
286
+	
287
+    // AclRequested errors
288
+    const ERROR_ACL_REQUESTED_NULL = -2250;
289
+    const ERROR_ACL_REQUESTED_EMPTY = -2251;
290
+    const ERROR_ACL_REQUESTED_TOO_SHORT = -2252;
291
+    const ERROR_ACL_REQUESTED_TOO_LONG = -2253;
292
+    const ERROR_ACL_REQUESTED_NOT_HEX = -2254;
293
+	
294
+    // Description errors
295
+    const ERROR_DESCRIPTION_TOO_LONG = -2270;
296
+	
297
+    // Data errors
298
+    const ERROR_DATA_NULL = -2280;
299
+    const ERROR_DATA_EMPTY = -2281;
300
+    const ERROR_DATA_TOO_LONG = -2282;
301
+    const ERROR_DATA_NOT_HEX = -2283;
302
+	
303
+    // AuthenticationLevel error
304
+    const ERROR_AUTHENTICATION_LEVEL_OUT_OF_BOUNDS = -2290;
305
+	
306
+    // ReturnPath error
307
+    const ERROR_RETURN_PATH_OUT_OF_BOUNDS = -2300;
308
+	
309
+    // min_aut_lev error
310
+    const ERROR_MIN_AUT_LEV_OUT_OF_BOUNDS = -2310;
311
+	
312
+    // HexData errors
313
+    const ERROR_HEX_DATA_NULL = -2320;
314
+    const ERROR_HEX_DATA_NOT_HEX = -2321;
315 315
 		
316
-	// BRAK errors
317
-	const ERROR_BRAK_NOT_SET = -2330;
318
-	const ERROR_BRAK_LENGTH_NOT_CORRECT = -2331;
319
-	const ERROR_BARS_LENGTH_NOT_CORRECT = -2332;
316
+    // BRAK errors
317
+    const ERROR_BRAK_NOT_SET = -2330;
318
+    const ERROR_BRAK_LENGTH_NOT_CORRECT = -2331;
319
+    const ERROR_BARS_LENGTH_NOT_CORRECT = -2332;
320 320
 
321
-	// BRAC errors
322
-	const ERROR_BRAC_NULL = -2340;
323
-	const ERROR_BRAC_EMPTY = -2341;
324
-	const ERROR_BRAC_NOT_HEX = -2342;
325
-	
326
-	// OTBLC errors
327
-	const ERROR_OTBLC_NOT_FOUND = -2350;
328
-	const ERROR_OTBLC_NULL = -2351;
329
-	const ERROR_OTBLC_EMPTY = -2352;
330
-	const ERROR_OTBLC_TOO_SHORT = -2353;
331
-	const ERROR_OTBLC_TOO_LONG = -2354;
332
-	const ERROR_OTBLC_NOT_HEX = -2355;
333
-	const ERROR_OTBLC_DIFFERENT = -2356;
334
-	
335
-	// BLC nonce errors
336
-	const ERROR_BLC_NONCE_FORMAT_NOT_CORRECT = -2360;
337
-	const ERROR_BLC_NONCE_NULL_OR_EMPTY = -2361;
338
-	
339
-	// enrolment type error
340
-	const ERROR_ENROLMENT_TYPE_UNKNOWN = -2370;
341
-	
342
-	// lock errors
343
-	const ERROR_LOCKING_REASON_NULL = -2380;
344
-	const ERROR_LOCKING_REASON_EMPTY = -2381;
345
-	const ERROR_UNLOCKING_REASON_NULL = -2382;
346
-	const ERROR_UNLOCKING_REASON_EMPTY = -2383;	
347
-	
348
-	// idT error
349
-	const ERROR_IDT_INVALID = -2390;
350
-	
351
-	/*
321
+    // BRAC errors
322
+    const ERROR_BRAC_NULL = -2340;
323
+    const ERROR_BRAC_EMPTY = -2341;
324
+    const ERROR_BRAC_NOT_HEX = -2342;
325
+	
326
+    // OTBLC errors
327
+    const ERROR_OTBLC_NOT_FOUND = -2350;
328
+    const ERROR_OTBLC_NULL = -2351;
329
+    const ERROR_OTBLC_EMPTY = -2352;
330
+    const ERROR_OTBLC_TOO_SHORT = -2353;
331
+    const ERROR_OTBLC_TOO_LONG = -2354;
332
+    const ERROR_OTBLC_NOT_HEX = -2355;
333
+    const ERROR_OTBLC_DIFFERENT = -2356;
334
+	
335
+    // BLC nonce errors
336
+    const ERROR_BLC_NONCE_FORMAT_NOT_CORRECT = -2360;
337
+    const ERROR_BLC_NONCE_NULL_OR_EMPTY = -2361;
338
+	
339
+    // enrolment type error
340
+    const ERROR_ENROLMENT_TYPE_UNKNOWN = -2370;
341
+	
342
+    // lock errors
343
+    const ERROR_LOCKING_REASON_NULL = -2380;
344
+    const ERROR_LOCKING_REASON_EMPTY = -2381;
345
+    const ERROR_UNLOCKING_REASON_NULL = -2382;
346
+    const ERROR_UNLOCKING_REASON_EMPTY = -2383;	
347
+	
348
+    // idT error
349
+    const ERROR_IDT_INVALID = -2390;
350
+	
351
+    /*
352 352
 	 * User errors (-2400 to -2479)
353 353
 	 */
354
-	const ERROR_USER_NOT_FOUND = -2400;
355
-	const ERROR_GROUP_NOT_FOUND = -2401;
356
-	const ERROR_USERNAME_AND_AAID_CANNOT_BE_THE_SAME = -2402;
357
-	const ERROR_USER_ALREADY_CREATED = -2403;
358
-	const ERROR_GROUP_ALREADY_EXIST = -2404;
359
-	const ERROR_USER_ALREADY_ASSIGNED_TO_AAID = -2405;
360
-	const ERROR_USER_ALREADY_ASSIGNED_TO_GROUP = -2406;
361
-	const ERROR_USER_ALREADY_REMOVED_FROM_GROUP = -2407;
362
-	const ERROR_USER_CAN_NOT_BE_DELETED = -2408;
363
-	const ERROR_USERNAME_NOT_CORRECT = -2409; 
364
-	const ERROR_USERNAME_AAID_NOT_CORRECT = -2410;
365
-	const ERROR_USERNAME_GROUPNAME_NOT_CORRECT = -2411;
366
-	const ERROR_GROUPNAME_NOT_CORRECT = -2412;
367
-	const ERROR_PASSWORD_NOT_CORRECT = -2413;
368
-	const ERROR_USERNAME_PASSWORD_NOT_SET = -2414;
369
-	const ERROR_GROUPS_EMPTY = -2415;
370
-	const ERROR_DEFAULT_ADMIN_USER_NOT_FOUND = -2416;
371
-	const ERROR_DEFAULT_ADMIN_USER_NOT_VALID = -2417;
372
-	const ERROR_DEFAULT_ADMIN_USER_CAN_NOT_BE_DELETED = -2418;
373
-	const ERROR_DEFAULT_ADMIN_USER_CANNOT_BE_REMOVED_FROM_GROUP = -2419;
374
-	const ERROR_DEFAULT_ADMIN_USER_ALREADY_CREATED = -2420;
375
-	const ERROR_PASSWORD_OF_DEFAULT_ADMIN_USER_NOT_CHANGED = -2421;
376
-	const ERROR_PERMISSION_DENIED = -2422;
354
+    const ERROR_USER_NOT_FOUND = -2400;
355
+    const ERROR_GROUP_NOT_FOUND = -2401;
356
+    const ERROR_USERNAME_AND_AAID_CANNOT_BE_THE_SAME = -2402;
357
+    const ERROR_USER_ALREADY_CREATED = -2403;
358
+    const ERROR_GROUP_ALREADY_EXIST = -2404;
359
+    const ERROR_USER_ALREADY_ASSIGNED_TO_AAID = -2405;
360
+    const ERROR_USER_ALREADY_ASSIGNED_TO_GROUP = -2406;
361
+    const ERROR_USER_ALREADY_REMOVED_FROM_GROUP = -2407;
362
+    const ERROR_USER_CAN_NOT_BE_DELETED = -2408;
363
+    const ERROR_USERNAME_NOT_CORRECT = -2409; 
364
+    const ERROR_USERNAME_AAID_NOT_CORRECT = -2410;
365
+    const ERROR_USERNAME_GROUPNAME_NOT_CORRECT = -2411;
366
+    const ERROR_GROUPNAME_NOT_CORRECT = -2412;
367
+    const ERROR_PASSWORD_NOT_CORRECT = -2413;
368
+    const ERROR_USERNAME_PASSWORD_NOT_SET = -2414;
369
+    const ERROR_GROUPS_EMPTY = -2415;
370
+    const ERROR_DEFAULT_ADMIN_USER_NOT_FOUND = -2416;
371
+    const ERROR_DEFAULT_ADMIN_USER_NOT_VALID = -2417;
372
+    const ERROR_DEFAULT_ADMIN_USER_CAN_NOT_BE_DELETED = -2418;
373
+    const ERROR_DEFAULT_ADMIN_USER_CANNOT_BE_REMOVED_FROM_GROUP = -2419;
374
+    const ERROR_DEFAULT_ADMIN_USER_ALREADY_CREATED = -2420;
375
+    const ERROR_PASSWORD_OF_DEFAULT_ADMIN_USER_NOT_CHANGED = -2421;
376
+    const ERROR_PERMISSION_DENIED = -2422;
377 377
 
378
-	/*
378
+    /*
379 379
 	 * Configuration errors (-2480 to -2499)
380 380
 	 */
381
-	const ERROR_CONFIGURATION_NOT_FOUND = -2480;
382
-	const ERROR_CONFIGURATION_ITEM_NOT_FOUND = -2481;
383
-	const ERROR_CONFIGURATION_NAME_TOO_SHORT = -2482;
384
-	const ERROR_CONFIGURATION_NAME_TOO_LONG = -2483;
385
-	const ERROR_CONFIGURATION_DESCRIPTION_TOO_LONG = -2484;
386
-	const ERROR_CONFIGURATION_TYPE_OUT_OF_BOUNDS = -2485;
387
-	const ERROR_CONFIGURATION_POSITION_OUT_OF_BOUNDS = -2486;
388
-	const ERROR_CONFIGURATION_ALREADY_EXIST = -2487;
389
-	const ERROR_CONFIGURATION_ITEM_NAME_TOO_LONG = -2488;
390
-	const ERROR_CONFIGURATION_ITEM_ALREADY_EXIST = -2489;
391
-	
392
-	/*
381
+    const ERROR_CONFIGURATION_NOT_FOUND = -2480;
382
+    const ERROR_CONFIGURATION_ITEM_NOT_FOUND = -2481;
383
+    const ERROR_CONFIGURATION_NAME_TOO_SHORT = -2482;
384
+    const ERROR_CONFIGURATION_NAME_TOO_LONG = -2483;
385
+    const ERROR_CONFIGURATION_DESCRIPTION_TOO_LONG = -2484;
386
+    const ERROR_CONFIGURATION_TYPE_OUT_OF_BOUNDS = -2485;
387
+    const ERROR_CONFIGURATION_POSITION_OUT_OF_BOUNDS = -2486;
388
+    const ERROR_CONFIGURATION_ALREADY_EXIST = -2487;
389
+    const ERROR_CONFIGURATION_ITEM_NAME_TOO_LONG = -2488;
390
+    const ERROR_CONFIGURATION_ITEM_ALREADY_EXIST = -2489;
391
+	
392
+    /*
393 393
 	 * Generator errors (-2500 to -2599)
394 394
 	 */
395
-	const ERROR_BAC_GENERATOR_NOT_INITIALIZED = -2500;
396
-	const ERROR_FLICKERING_GENERATOR_NOT_FOUND = -2501;
397
-	const ERROR_MESSAGE_GENERATOR_NOT_FOUND = -2502;
398
-	const ERROR_CODEBOOK_GENERATOR_NOT_INITIALIZED = -2503;
399
-	const ERROR_DEBUG_MESSAGE_GENERATOR_NOT_FOUND = -2504;
400
-	const ERROR_TCS_GENERATOR_CLASS_NOT_VALID = -2505;
401
-	const ERROR_TCS_GENERATOR_NOT_CREATED = -2506;
402
-	
403
-	/*
395
+    const ERROR_BAC_GENERATOR_NOT_INITIALIZED = -2500;
396
+    const ERROR_FLICKERING_GENERATOR_NOT_FOUND = -2501;
397
+    const ERROR_MESSAGE_GENERATOR_NOT_FOUND = -2502;
398
+    const ERROR_CODEBOOK_GENERATOR_NOT_INITIALIZED = -2503;
399
+    const ERROR_DEBUG_MESSAGE_GENERATOR_NOT_FOUND = -2504;
400
+    const ERROR_TCS_GENERATOR_CLASS_NOT_VALID = -2505;
401
+    const ERROR_TCS_GENERATOR_NOT_CREATED = -2506;
402
+	
403
+    /*
404 404
 	 * Other errors (-2600 to -xxxx)
405 405
 	 */
406
-	const ERROR_DOS_TIMELIMIT = -2600;
407
-	const ERROR_IO = -2601;
408
-	const ERROR_WSDL_LOCATION_PROPERTY_NOT_SET = -2602;
409
-	const ERROR_AXS_UPDATER_SERVICE_NOT_CALLED = -2603;
410
-	const ERROR_DOMAIN_VIOLATION_BY_UPDATE_SESSION_SEED = -2604;
411
-	const ERROR_CREATE_CORE_WITH_EXISTING_USCN = -2605;
412
-	
413
-	/*
406
+    const ERROR_DOS_TIMELIMIT = -2600;
407
+    const ERROR_IO = -2601;
408
+    const ERROR_WSDL_LOCATION_PROPERTY_NOT_SET = -2602;
409
+    const ERROR_AXS_UPDATER_SERVICE_NOT_CALLED = -2603;
410
+    const ERROR_DOMAIN_VIOLATION_BY_UPDATE_SESSION_SEED = -2604;
411
+    const ERROR_CREATE_CORE_WITH_EXISTING_USCN = -2605;
412
+	
413
+    /*
414 414
 	 * Roaming errors (-2700 to -2799)
415 415
 	 */
416
-	// configuration problems
417
-	const ERROR_KEYFETCHING_NOT_CONFIGURED = -2700;
418
-	// connection problems sm - cm
419
-	const ERROR_KEYFETCHING_SM_CANNOT_CONNECT_TO_CM_WSDL_WRONG = -2710;
420
-	const ERROR_KEYFETCHING_SM_CANNOT_CONNECT_TO_CM_NOT_AUTHORIZED = -2711;
416
+    // configuration problems
417
+    const ERROR_KEYFETCHING_NOT_CONFIGURED = -2700;
418
+    // connection problems sm - cm
419
+    const ERROR_KEYFETCHING_SM_CANNOT_CONNECT_TO_CM_WSDL_WRONG = -2710;
420
+    const ERROR_KEYFETCHING_SM_CANNOT_CONNECT_TO_CM_NOT_AUTHORIZED = -2711;
421 421
 	
422
-	// errors outside of this server
423
-	const ERROR_KEYFETCHING_PERMANENT_ERROR_OUTSIDE_OF_THIS_SERVER = -2720;
424
-	const ERROR_KEYFETCHING_TEMPORARY_ERROR_OUTSIDE_OF_THIS_SERVER = -2721;
422
+    // errors outside of this server
423
+    const ERROR_KEYFETCHING_PERMANENT_ERROR_OUTSIDE_OF_THIS_SERVER = -2720;
424
+    const ERROR_KEYFETCHING_TEMPORARY_ERROR_OUTSIDE_OF_THIS_SERVER = -2721;
425 425
 	
426
-	// timeouts
427
-	const ERROR_KEYFETCHING_TIMEOUT_ON_SERVER = -2730;
426
+    // timeouts
427
+    const ERROR_KEYFETCHING_TIMEOUT_ON_SERVER = -2730;
428 428
 	
429
-	const ERROR_KEYSTORE_LOCATION_NOT_CORRECT = -2740;
429
+    const ERROR_KEYSTORE_LOCATION_NOT_CORRECT = -2740;
430 430
 		
431
-	/* removed 2009-02-18 - crohr	
431
+    /* removed 2009-02-18 - crohr	
432 432
 	 * The error does not occur anymore
433 433
 	 * const ERROR_SERVER_TIMEOUT = -3000;
434 434
 	 */	
435
-	const ERROR_WEBSERVICE = -3001;
436
-	const ERROR_DATABASE_CORRUPTED = -3002;
437
-	const ERROR_WSDL_URL_NOT_ACCESSIBLE = -3003;
438
-	const ERROR_PARAMETER_NULL = -4000;
439
-	const ERROR_PARAMETER_EMPTY = -4001;
440
-	const ERROR_PARAMETER_TOO_LONG = -4002;
435
+    const ERROR_WEBSERVICE = -3001;
436
+    const ERROR_DATABASE_CORRUPTED = -3002;
437
+    const ERROR_WSDL_URL_NOT_ACCESSIBLE = -3003;
438
+    const ERROR_PARAMETER_NULL = -4000;
439
+    const ERROR_PARAMETER_EMPTY = -4001;
440
+    const ERROR_PARAMETER_TOO_LONG = -4002;
441 441
 	
442
-	const ERROR_METHOD_NOT_SUPPORTED_ANYMORE = -5000;
442
+    const ERROR_METHOD_NOT_SUPPORTED_ANYMORE = -5000;
443 443
 	
444
-	const ERROR_FORWARD_SECURITY_NEWS_NOT_FOUND = -5100;
445
-	const ERROR_NEWS_NOT_SUPPORTED = -5101;
444
+    const ERROR_FORWARD_SECURITY_NEWS_NOT_FOUND = -5100;
445
+    const ERROR_NEWS_NOT_SUPPORTED = -5101;
446 446
 		
447
-	const ERROR_UNDEFINED = -9999;
447
+    const ERROR_UNDEFINED = -9999;
448 448
 }
449 449
 ?>
450 450
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,10 +19,12 @@
 block discarded – undo
19 19
 	 */
20 20
 	function getErrorcode($message) {
21 21
 		$errorcode = -10000;
22
-		if (($begin = strpos($message, "ERROR (")) === FALSE)
23
-			$begin = -1;
24
-		if (($end = strpos($message, ")")) === FALSE)
25
-			$end = -1;
22
+		if (($begin = strpos($message, "ERROR (")) === FALSE) {
23
+					$begin = -1;
24
+		}
25
+		if (($end = strpos($message, ")")) === FALSE) {
26
+					$end = -1;
27
+		}
26 28
 		
27 29
 		if ($begin >= 0 && $end >= 0) {
28 30
 			$realBegin = $begin + 7;
Please login to merge, or discard this patch.
includes/libraries/Authentication/agses/axs/axs/code2gif.php 2 patches
Indentation   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -43,73 +43,73 @@
 block discarded – undo
43 43
      *                 created gif files by almost 50%.
44 44
      */
45 45
 
46
-	// path to data files
47
-	$path = './images_gif';
46
+    // path to data files
47
+    $path = './images_gif';
48 48
 	
49
-	// get code from GET request, use dummy pattern if code not defined
50
-	$code = isset($_GET['code']) ? $_GET['code'] : '20100804020102040810';
49
+    // get code from GET request, use dummy pattern if code not defined
50
+    $code = isset($_GET['code']) ? $_GET['code'] : '20100804020102040810';
51 51
 
52
-	// get frame delay from GET request, default to "safe speed" if delay not
53
-	// defined or invalid. delay is specified in ms in the request and needs
54
-	// to be converted to 1/100s for use in GIF files
55
-	$delay = isset($_GET['delay']) ? ($_GET['delay']+0)/10 : 8;
56
-	$delay = ($delay > 0) ? $delay : 8;
52
+    // get frame delay from GET request, default to "safe speed" if delay not
53
+    // defined or invalid. delay is specified in ms in the request and needs
54
+    // to be converted to 1/100s for use in GIF files
55
+    $delay = isset($_GET['delay']) ? ($_GET['delay']+0)/10 : 8;
56
+    $delay = ($delay > 0) ? $delay : 8;
57 57
 
58
-	// code string must only contain hex characters, code length is limited to
59
-	// 1024 characters (512 frames)
60
-	$codelen = strlen($code);
61
-	if ( ctype_xdigit($code) && $codelen < 1024 ) {
58
+    // code string must only contain hex characters, code length is limited to
59
+    // 1024 characters (512 frames)
60
+    $codelen = strlen($code);
61
+    if ( ctype_xdigit($code) && $codelen < 1024 ) {
62 62
 	
63
-		// get prepared gif file header
64
-		$gif  = file_get_contents($path.'/head.bin');
63
+        // get prepared gif file header
64
+        $gif  = file_get_contents($path.'/head.bin');
65 65
 		
66
-		// build graphic control extension block
67
-		// disposal method   = 0
68
-		// transparent color = 255
69
-		$ext = "\x21\xf9\x04\x01".chr($delay&0xff).chr(($delay>>8)&0xff)."\xff\x00";
66
+        // build graphic control extension block
67
+        // disposal method   = 0
68
+        // transparent color = 255
69
+        $ext = "\x21\xf9\x04\x01".chr($delay&0xff).chr(($delay>>8)&0xff)."\xff\x00";
70 70
 		
71
-		// output image header
72
-		header('Content-type:image/gif');
73
-		print($gif);
71
+        // output image header
72
+        header('Content-type:image/gif');
73
+        print($gif);
74 74
 	
75
-		// append image data blocks as necessary
76
-		$size = filesize($path.'/data.bin');
77
-		$data = fopen($path.'/data.bin','r');
78
-		if ($data) {
75
+        // append image data blocks as necessary
76
+        $size = filesize($path.'/data.bin');
77
+        $data = fopen($path.'/data.bin','r');
78
+        if ($data) {
79 79
 
80
-			// load the index from the data file and unpack it into a PHP array.
81
-			// the index array contains the file offsets of the 4096 delta and
82
-			// base images inside the data file.
83
-			$index = unpack("V*", fread($data, 64*64*4));
80
+            // load the index from the data file and unpack it into a PHP array.
81
+            // the index array contains the file offsets of the 4096 delta and
82
+            // base images inside the data file.
83
+            $index = unpack("V*", fread($data, 64*64*4));
84 84
 
85
-			// when a code is repeated (prev and curr have the same value) a
86
-			// base image is inserted instead of a delta image. the first frame
87
-			// in the animation must be a base image, so we peek at the flicker
88
-			// code and set $prev to the first value in the string
89
-			$prev = hexdec(substr($code, 0, 2));
90
-			for ($i = 0; $i < $codelen; $i+=2) {
85
+            // when a code is repeated (prev and curr have the same value) a
86
+            // base image is inserted instead of a delta image. the first frame
87
+            // in the animation must be a base image, so we peek at the flicker
88
+            // code and set $prev to the first value in the string
89
+            $prev = hexdec(substr($code, 0, 2));
90
+            for ($i = 0; $i < $codelen; $i+=2) {
91 91
 
92
-				// get current code
93
-				$curr = hexdec(substr($code, $i, 2));
92
+                // get current code
93
+                $curr = hexdec(substr($code, $i, 2));
94 94
 						
95
-				// locate image block in data file
96
-				$blockIdx = $prev*64+$curr+1;	// array starts at 1
97
-				$blockPos = $index[$blockIdx];
98
-				$blockLen = ($blockIdx < 4096 ? $index[$blockIdx+1] : $size) - $blockPos;
95
+                // locate image block in data file
96
+                $blockIdx = $prev*64+$curr+1;	// array starts at 1
97
+                $blockPos = $index[$blockIdx];
98
+                $blockLen = ($blockIdx < 4096 ? $index[$blockIdx+1] : $size) - $blockPos;
99 99
 				
100
-				// output extension header
101
-				print($ext);
100
+                // output extension header
101
+                print($ext);
102 102
 
103
-				// output image block
104
-				fseek($data, $blockPos);
105
-				print(fread($data, $blockLen));
103
+                // output image block
104
+                fseek($data, $blockPos);
105
+                print(fread($data, $blockLen));
106 106
 			
107
-				$prev = $curr;
108
-			}
107
+                $prev = $curr;
108
+            }
109 109
 
110
-			// file terminator
111
-			print(";");
112
-		}
113
-	}
110
+            // file terminator
111
+            print(";");
112
+        }
113
+    }
114 114
     /******/
115 115
 ?>
116 116
\ No newline at end of file
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -52,21 +52,21 @@  discard block
 block discarded – undo
52 52
 	// get frame delay from GET request, default to "safe speed" if delay not
53 53
 	// defined or invalid. delay is specified in ms in the request and needs
54 54
 	// to be converted to 1/100s for use in GIF files
55
-	$delay = isset($_GET['delay']) ? ($_GET['delay']+0)/10 : 8;
55
+	$delay = isset($_GET['delay']) ? ($_GET['delay'] + 0) / 10 : 8;
56 56
 	$delay = ($delay > 0) ? $delay : 8;
57 57
 
58 58
 	// code string must only contain hex characters, code length is limited to
59 59
 	// 1024 characters (512 frames)
60 60
 	$codelen = strlen($code);
61
-	if ( ctype_xdigit($code) && $codelen < 1024 ) {
61
+	if (ctype_xdigit($code) && $codelen < 1024) {
62 62
 	
63 63
 		// get prepared gif file header
64
-		$gif  = file_get_contents($path.'/head.bin');
64
+		$gif = file_get_contents($path.'/head.bin');
65 65
 		
66 66
 		// build graphic control extension block
67 67
 		// disposal method   = 0
68 68
 		// transparent color = 255
69
-		$ext = "\x21\xf9\x04\x01".chr($delay&0xff).chr(($delay>>8)&0xff)."\xff\x00";
69
+		$ext = "\x21\xf9\x04\x01".chr($delay & 0xff).chr(($delay >> 8) & 0xff)."\xff\x00";
70 70
 		
71 71
 		// output image header
72 72
 		header('Content-type:image/gif');
@@ -74,28 +74,28 @@  discard block
 block discarded – undo
74 74
 	
75 75
 		// append image data blocks as necessary
76 76
 		$size = filesize($path.'/data.bin');
77
-		$data = fopen($path.'/data.bin','r');
77
+		$data = fopen($path.'/data.bin', 'r');
78 78
 		if ($data) {
79 79
 
80 80
 			// load the index from the data file and unpack it into a PHP array.
81 81
 			// the index array contains the file offsets of the 4096 delta and
82 82
 			// base images inside the data file.
83
-			$index = unpack("V*", fread($data, 64*64*4));
83
+			$index = unpack("V*", fread($data, 64 * 64 * 4));
84 84
 
85 85
 			// when a code is repeated (prev and curr have the same value) a
86 86
 			// base image is inserted instead of a delta image. the first frame
87 87
 			// in the animation must be a base image, so we peek at the flicker
88 88
 			// code and set $prev to the first value in the string
89 89
 			$prev = hexdec(substr($code, 0, 2));
90
-			for ($i = 0; $i < $codelen; $i+=2) {
90
+			for ($i = 0; $i < $codelen; $i += 2) {
91 91
 
92 92
 				// get current code
93 93
 				$curr = hexdec(substr($code, $i, 2));
94 94
 						
95 95
 				// locate image block in data file
96
-				$blockIdx = $prev*64+$curr+1;	// array starts at 1
96
+				$blockIdx = $prev * 64 + $curr + 1; // array starts at 1
97 97
 				$blockPos = $index[$blockIdx];
98
-				$blockLen = ($blockIdx < 4096 ? $index[$blockIdx+1] : $size) - $blockPos;
98
+				$blockLen = ($blockIdx < 4096 ? $index[$blockIdx + 1] : $size) - $blockPos;
99 99
 				
100 100
 				// output extension header
101 101
 				print($ext);
Please login to merge, or discard this patch.
includes/libraries/Authentication/phpseclib/Crypt/TripleDES.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
         if ($engine == self::ENGINE_OPENSSL) {
192 192
             $this->cipher_name_openssl_ecb = 'des-ede3';
193 193
             $mode = $this->_openssl_translate_mode();
194
-            $this->cipher_name_openssl = $mode == 'ecb' ? 'des-ede3' : 'des-ede3-' . $mode;
194
+            $this->cipher_name_openssl = $mode == 'ecb' ? 'des-ede3' : 'des-ede3-'.$mode;
195 195
         }
196 196
 
197 197
         return parent::isValidEngine($engine);
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
             case 192:
236 236
                 break;
237 237
             default:
238
-                throw new \LengthException('Key size of ' . $length . ' bits is not supported by this algorithm. Only keys of sizes 128 or 192 bits are supported');
238
+                throw new \LengthException('Key size of '.$length.' bits is not supported by this algorithm. Only keys of sizes 128 or 192 bits are supported');
239 239
         }
240 240
 
241 241
         parent::setKeyLength($length);
@@ -257,16 +257,16 @@  discard block
 block discarded – undo
257 257
     function setKey($key)
258 258
     {
259 259
         if ($this->explicit_key_length !== false && strlen($key) != $this->explicit_key_length) {
260
-            throw new \LengthException('Key length has already been set to ' . $this->explicit_key_length . ' bytes and this key is ' . strlen($key) . ' bytes');
260
+            throw new \LengthException('Key length has already been set to '.$this->explicit_key_length.' bytes and this key is '.strlen($key).' bytes');
261 261
         }
262 262
 
263 263
         switch (strlen($key)) {
264 264
             case 16:
265
-                $key.= substr($key, 0, 8);
265
+                $key .= substr($key, 0, 8);
266 266
             case 24:
267 267
                 break;
268 268
             default:
269
-                throw new \LengthException('Key of size ' . strlen($key) . ' not supported by this algorithm. Only keys of sizes 16 or 24 are supported');
269
+                throw new \LengthException('Key of size '.strlen($key).' not supported by this algorithm. Only keys of sizes 16 or 24 are supported');
270 270
         }
271 271
 
272 272
         // copied from self::setKey()
@@ -276,8 +276,8 @@  discard block
 block discarded – undo
276 276
         $this->_setEngine();
277 277
 
278 278
         if ($this->mode_3cbc) {
279
-            $this->des[0]->setKey(substr($key,  0, 8));
280
-            $this->des[1]->setKey(substr($key,  8, 8));
279
+            $this->des[0]->setKey(substr($key, 0, 8));
280
+            $this->des[1]->setKey(substr($key, 8, 8));
281 281
             $this->des[2]->setKey(substr($key, 16, 8));
282 282
         }
283 283
     }
Please login to merge, or discard this patch.
includes/libraries/Authentication/phpseclib/Crypt/Twofish.php 2 patches
Indentation   +53 added lines, -53 removed lines patch added patch discarded remove patch
@@ -464,13 +464,13 @@  discard block
 block discarded – undo
464 464
                 list($s3, $s2, $s1, $s0) = $this->_mdsrem($le_longs[3], $le_longs[4]);
465 465
                 for ($i = 0, $j = 1; $i < 40; $i+= 2, $j+= 2) {
466 466
                     $A = $m0[$q0[$q0[$i] ^ $key[ 9]] ^ $key[1]] ^
467
-                         $m1[$q0[$q1[$i] ^ $key[10]] ^ $key[2]] ^
468
-                         $m2[$q1[$q0[$i] ^ $key[11]] ^ $key[3]] ^
469
-                         $m3[$q1[$q1[$i] ^ $key[12]] ^ $key[4]];
467
+                            $m1[$q0[$q1[$i] ^ $key[10]] ^ $key[2]] ^
468
+                            $m2[$q1[$q0[$i] ^ $key[11]] ^ $key[3]] ^
469
+                            $m3[$q1[$q1[$i] ^ $key[12]] ^ $key[4]];
470 470
                     $B = $m0[$q0[$q0[$j] ^ $key[13]] ^ $key[5]] ^
471
-                         $m1[$q0[$q1[$j] ^ $key[14]] ^ $key[6]] ^
472
-                         $m2[$q1[$q0[$j] ^ $key[15]] ^ $key[7]] ^
473
-                         $m3[$q1[$q1[$j] ^ $key[16]] ^ $key[8]];
471
+                            $m1[$q0[$q1[$j] ^ $key[14]] ^ $key[6]] ^
472
+                            $m2[$q1[$q0[$j] ^ $key[15]] ^ $key[7]] ^
473
+                            $m3[$q1[$q1[$j] ^ $key[16]] ^ $key[8]];
474 474
                     $B = ($B << 8) | ($B >> 24 & 0xff);
475 475
                     $K[] = $A+= $B;
476 476
                     $K[] = (($A+= $B) << 9 | $A >> 23 & 0x1ff);
@@ -488,13 +488,13 @@  discard block
 block discarded – undo
488 488
                 list($s3, $s2, $s1, $s0) = $this->_mdsrem($le_longs[5], $le_longs[6]);
489 489
                 for ($i = 0, $j = 1; $i < 40; $i+= 2, $j+= 2) {
490 490
                     $A = $m0[$q0[$q0[$q1[$i] ^ $key[17]] ^ $key[ 9]] ^ $key[1]] ^
491
-                         $m1[$q0[$q1[$q1[$i] ^ $key[18]] ^ $key[10]] ^ $key[2]] ^
492
-                         $m2[$q1[$q0[$q0[$i] ^ $key[19]] ^ $key[11]] ^ $key[3]] ^
493
-                         $m3[$q1[$q1[$q0[$i] ^ $key[20]] ^ $key[12]] ^ $key[4]];
491
+                            $m1[$q0[$q1[$q1[$i] ^ $key[18]] ^ $key[10]] ^ $key[2]] ^
492
+                            $m2[$q1[$q0[$q0[$i] ^ $key[19]] ^ $key[11]] ^ $key[3]] ^
493
+                            $m3[$q1[$q1[$q0[$i] ^ $key[20]] ^ $key[12]] ^ $key[4]];
494 494
                     $B = $m0[$q0[$q0[$q1[$j] ^ $key[21]] ^ $key[13]] ^ $key[5]] ^
495
-                         $m1[$q0[$q1[$q1[$j] ^ $key[22]] ^ $key[14]] ^ $key[6]] ^
496
-                         $m2[$q1[$q0[$q0[$j] ^ $key[23]] ^ $key[15]] ^ $key[7]] ^
497
-                         $m3[$q1[$q1[$q0[$j] ^ $key[24]] ^ $key[16]] ^ $key[8]];
495
+                            $m1[$q0[$q1[$q1[$j] ^ $key[22]] ^ $key[14]] ^ $key[6]] ^
496
+                            $m2[$q1[$q0[$q0[$j] ^ $key[23]] ^ $key[15]] ^ $key[7]] ^
497
+                            $m3[$q1[$q1[$q0[$j] ^ $key[24]] ^ $key[16]] ^ $key[8]];
498 498
                     $B = ($B << 8) | ($B >> 24 & 0xff);
499 499
                     $K[] = $A+= $B;
500 500
                     $K[] = (($A+= $B) << 9 | $A >> 23 & 0x1ff);
@@ -513,13 +513,13 @@  discard block
 block discarded – undo
513 513
                 list($s3, $s2, $s1, $s0) = $this->_mdsrem($le_longs[7], $le_longs[8]);
514 514
                 for ($i = 0, $j = 1; $i < 40; $i+= 2, $j+= 2) {
515 515
                     $A = $m0[$q0[$q0[$q1[$q1[$i] ^ $key[25]] ^ $key[17]] ^ $key[ 9]] ^ $key[1]] ^
516
-                         $m1[$q0[$q1[$q1[$q0[$i] ^ $key[26]] ^ $key[18]] ^ $key[10]] ^ $key[2]] ^
517
-                         $m2[$q1[$q0[$q0[$q0[$i] ^ $key[27]] ^ $key[19]] ^ $key[11]] ^ $key[3]] ^
518
-                         $m3[$q1[$q1[$q0[$q1[$i] ^ $key[28]] ^ $key[20]] ^ $key[12]] ^ $key[4]];
516
+                            $m1[$q0[$q1[$q1[$q0[$i] ^ $key[26]] ^ $key[18]] ^ $key[10]] ^ $key[2]] ^
517
+                            $m2[$q1[$q0[$q0[$q0[$i] ^ $key[27]] ^ $key[19]] ^ $key[11]] ^ $key[3]] ^
518
+                            $m3[$q1[$q1[$q0[$q1[$i] ^ $key[28]] ^ $key[20]] ^ $key[12]] ^ $key[4]];
519 519
                     $B = $m0[$q0[$q0[$q1[$q1[$j] ^ $key[29]] ^ $key[21]] ^ $key[13]] ^ $key[5]] ^
520
-                         $m1[$q0[$q1[$q1[$q0[$j] ^ $key[30]] ^ $key[22]] ^ $key[14]] ^ $key[6]] ^
521
-                         $m2[$q1[$q0[$q0[$q0[$j] ^ $key[31]] ^ $key[23]] ^ $key[15]] ^ $key[7]] ^
522
-                         $m3[$q1[$q1[$q0[$q1[$j] ^ $key[32]] ^ $key[24]] ^ $key[16]] ^ $key[8]];
520
+                            $m1[$q0[$q1[$q1[$q0[$j] ^ $key[30]] ^ $key[22]] ^ $key[14]] ^ $key[6]] ^
521
+                            $m2[$q1[$q0[$q0[$q0[$j] ^ $key[31]] ^ $key[23]] ^ $key[15]] ^ $key[7]] ^
522
+                            $m3[$q1[$q1[$q0[$q1[$j] ^ $key[32]] ^ $key[24]] ^ $key[16]] ^ $key[8]];
523 523
                     $B = ($B << 8) | ($B >> 24 & 0xff);
524 524
                     $K[] = $A+= $B;
525 525
                     $K[] = (($A+= $B) << 9 | $A >> 23 & 0x1ff);
@@ -611,25 +611,25 @@  discard block
 block discarded – undo
611 611
         $ki = 7;
612 612
         while ($ki < 39) {
613 613
             $t0 = $S0[ $R0        & 0xff] ^
614
-                  $S1[($R0 >>  8) & 0xff] ^
615
-                  $S2[($R0 >> 16) & 0xff] ^
616
-                  $S3[($R0 >> 24) & 0xff];
614
+                    $S1[($R0 >>  8) & 0xff] ^
615
+                    $S2[($R0 >> 16) & 0xff] ^
616
+                    $S3[($R0 >> 24) & 0xff];
617 617
             $t1 = $S0[($R1 >> 24) & 0xff] ^
618
-                  $S1[ $R1        & 0xff] ^
619
-                  $S2[($R1 >>  8) & 0xff] ^
620
-                  $S3[($R1 >> 16) & 0xff];
618
+                    $S1[ $R1        & 0xff] ^
619
+                    $S2[($R1 >>  8) & 0xff] ^
620
+                    $S3[($R1 >> 16) & 0xff];
621 621
             $R2^= $t0 + $t1 + $K[++$ki];
622 622
             $R2 = ($R2 >> 1 & 0x7fffffff) | ($R2 << 31);
623 623
             $R3 = ((($R3 >> 31) & 1) | ($R3 << 1)) ^ ($t0 + ($t1 << 1) + $K[++$ki]);
624 624
 
625 625
             $t0 = $S0[ $R2        & 0xff] ^
626
-                  $S1[($R2 >>  8) & 0xff] ^
627
-                  $S2[($R2 >> 16) & 0xff] ^
628
-                  $S3[($R2 >> 24) & 0xff];
626
+                    $S1[($R2 >>  8) & 0xff] ^
627
+                    $S2[($R2 >> 16) & 0xff] ^
628
+                    $S3[($R2 >> 24) & 0xff];
629 629
             $t1 = $S0[($R3 >> 24) & 0xff] ^
630
-                  $S1[ $R3        & 0xff] ^
631
-                  $S2[($R3 >>  8) & 0xff] ^
632
-                  $S3[($R3 >> 16) & 0xff];
630
+                    $S1[ $R3        & 0xff] ^
631
+                    $S2[($R3 >>  8) & 0xff] ^
632
+                    $S3[($R3 >> 16) & 0xff];
633 633
             $R0^= ($t0 + $t1 + $K[++$ki]);
634 634
             $R0 = ($R0 >> 1 & 0x7fffffff) | ($R0 << 31);
635 635
             $R1 = ((($R1 >> 31) & 1) | ($R1 << 1)) ^ ($t0 + ($t1 << 1) + $K[++$ki]);
@@ -637,9 +637,9 @@  discard block
 block discarded – undo
637 637
 
638 638
         // @codingStandardsIgnoreStart
639 639
         return pack("V4", $K[4] ^ $R2,
640
-                          $K[5] ^ $R3,
641
-                          $K[6] ^ $R0,
642
-                          $K[7] ^ $R1);
640
+                            $K[5] ^ $R3,
641
+                            $K[6] ^ $R0,
642
+                            $K[7] ^ $R1);
643 643
         // @codingStandardsIgnoreEnd
644 644
     }
645 645
 
@@ -667,25 +667,25 @@  discard block
 block discarded – undo
667 667
         $ki = 40;
668 668
         while ($ki > 8) {
669 669
             $t0 = $S0[$R0       & 0xff] ^
670
-                  $S1[$R0 >>  8 & 0xff] ^
671
-                  $S2[$R0 >> 16 & 0xff] ^
672
-                  $S3[$R0 >> 24 & 0xff];
670
+                    $S1[$R0 >>  8 & 0xff] ^
671
+                    $S2[$R0 >> 16 & 0xff] ^
672
+                    $S3[$R0 >> 24 & 0xff];
673 673
             $t1 = $S0[$R1 >> 24 & 0xff] ^
674
-                  $S1[$R1       & 0xff] ^
675
-                  $S2[$R1 >>  8 & 0xff] ^
676
-                  $S3[$R1 >> 16 & 0xff];
674
+                    $S1[$R1       & 0xff] ^
675
+                    $S2[$R1 >>  8 & 0xff] ^
676
+                    $S3[$R1 >> 16 & 0xff];
677 677
             $R3^= $t0 + ($t1 << 1) + $K[--$ki];
678 678
             $R3 = $R3 >> 1 & 0x7fffffff | $R3 << 31;
679 679
             $R2 = ($R2 >> 31 & 0x1 | $R2 << 1) ^ ($t0 + $t1 + $K[--$ki]);
680 680
 
681 681
             $t0 = $S0[$R2       & 0xff] ^
682
-                  $S1[$R2 >>  8 & 0xff] ^
683
-                  $S2[$R2 >> 16 & 0xff] ^
684
-                  $S3[$R2 >> 24 & 0xff];
682
+                    $S1[$R2 >>  8 & 0xff] ^
683
+                    $S2[$R2 >> 16 & 0xff] ^
684
+                    $S3[$R2 >> 24 & 0xff];
685 685
             $t1 = $S0[$R3 >> 24 & 0xff] ^
686
-                  $S1[$R3       & 0xff] ^
687
-                  $S2[$R3 >>  8 & 0xff] ^
688
-                  $S3[$R3 >> 16 & 0xff];
686
+                    $S1[$R3       & 0xff] ^
687
+                    $S2[$R3 >>  8 & 0xff] ^
688
+                    $S3[$R3 >> 16 & 0xff];
689 689
             $R1^= $t0 + ($t1 << 1) + $K[--$ki];
690 690
             $R1 = $R1 >> 1 & 0x7fffffff | $R1 << 31;
691 691
             $R0 = ($R0 >> 31 & 0x1 | $R0 << 1) ^ ($t0 + $t1 + $K[--$ki]);
@@ -693,9 +693,9 @@  discard block
 block discarded – undo
693 693
 
694 694
         // @codingStandardsIgnoreStart
695 695
         return pack("V4", $K[0] ^ $R2,
696
-                          $K[1] ^ $R3,
697
-                          $K[2] ^ $R0,
698
-                          $K[3] ^ $R1);
696
+                            $K[1] ^ $R3,
697
+                            $K[2] ^ $R0,
698
+                            $K[3] ^ $R1);
699 699
         // @codingStandardsIgnoreEnd
700 700
     }
701 701
 
@@ -835,11 +835,11 @@  discard block
 block discarded – undo
835 835
 
836 836
             $lambda_functions[$code_hash] = $this->_createInlineCryptFunction(
837 837
                 array(
838
-                   'init_crypt'    => $init_crypt,
839
-                   'init_encrypt'  => '',
840
-                   'init_decrypt'  => '',
841
-                   'encrypt_block' => $encrypt_block,
842
-                   'decrypt_block' => $decrypt_block
838
+                    'init_crypt'    => $init_crypt,
839
+                    'init_encrypt'  => '',
840
+                    'init_decrypt'  => '',
841
+                    'encrypt_block' => $encrypt_block,
842
+                    'decrypt_block' => $decrypt_block
843 843
                 )
844 844
             );
845 845
         }
Please login to merge, or discard this patch.
Spacing   +50 added lines, -50 removed lines patch added patch discarded remove patch
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
             case 256:
403 403
                 break;
404 404
             default:
405
-                throw new \LengthException('Key of size ' . strlen($key) . ' not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported');
405
+                throw new \LengthException('Key of size '.strlen($key).' not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported');
406 406
         }
407 407
 
408 408
         parent::setKeyLength($length);
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
             case 32:
427 427
                 break;
428 428
             default:
429
-                throw new \LengthException('Key of size ' . strlen($key) . ' not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported');
429
+                throw new \LengthException('Key of size '.strlen($key).' not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported');
430 430
         }
431 431
 
432 432
         parent::setKey($key);
@@ -462,8 +462,8 @@  discard block
 block discarded – undo
462 462
             case 16:
463 463
                 list($s7, $s6, $s5, $s4) = $this->_mdsrem($le_longs[1], $le_longs[2]);
464 464
                 list($s3, $s2, $s1, $s0) = $this->_mdsrem($le_longs[3], $le_longs[4]);
465
-                for ($i = 0, $j = 1; $i < 40; $i+= 2, $j+= 2) {
466
-                    $A = $m0[$q0[$q0[$i] ^ $key[ 9]] ^ $key[1]] ^
465
+                for ($i = 0, $j = 1; $i < 40; $i += 2, $j += 2) {
466
+                    $A = $m0[$q0[$q0[$i] ^ $key[9]] ^ $key[1]] ^
467 467
                          $m1[$q0[$q1[$i] ^ $key[10]] ^ $key[2]] ^
468 468
                          $m2[$q1[$q0[$i] ^ $key[11]] ^ $key[3]] ^
469 469
                          $m3[$q1[$q1[$i] ^ $key[12]] ^ $key[4]];
@@ -472,8 +472,8 @@  discard block
 block discarded – undo
472 472
                          $m2[$q1[$q0[$j] ^ $key[15]] ^ $key[7]] ^
473 473
                          $m3[$q1[$q1[$j] ^ $key[16]] ^ $key[8]];
474 474
                     $B = ($B << 8) | ($B >> 24 & 0xff);
475
-                    $K[] = $A+= $B;
476
-                    $K[] = (($A+= $B) << 9 | $A >> 23 & 0x1ff);
475
+                    $K[] = $A += $B;
476
+                    $K[] = (($A += $B) << 9 | $A >> 23 & 0x1ff);
477 477
                 }
478 478
                 for ($i = 0; $i < 256; ++$i) {
479 479
                     $S0[$i] = $m0[$q0[$q0[$i] ^ $s4] ^ $s0];
@@ -486,8 +486,8 @@  discard block
 block discarded – undo
486 486
                 list($sb, $sa, $s9, $s8) = $this->_mdsrem($le_longs[1], $le_longs[2]);
487 487
                 list($s7, $s6, $s5, $s4) = $this->_mdsrem($le_longs[3], $le_longs[4]);
488 488
                 list($s3, $s2, $s1, $s0) = $this->_mdsrem($le_longs[5], $le_longs[6]);
489
-                for ($i = 0, $j = 1; $i < 40; $i+= 2, $j+= 2) {
490
-                    $A = $m0[$q0[$q0[$q1[$i] ^ $key[17]] ^ $key[ 9]] ^ $key[1]] ^
489
+                for ($i = 0, $j = 1; $i < 40; $i += 2, $j += 2) {
490
+                    $A = $m0[$q0[$q0[$q1[$i] ^ $key[17]] ^ $key[9]] ^ $key[1]] ^
491 491
                          $m1[$q0[$q1[$q1[$i] ^ $key[18]] ^ $key[10]] ^ $key[2]] ^
492 492
                          $m2[$q1[$q0[$q0[$i] ^ $key[19]] ^ $key[11]] ^ $key[3]] ^
493 493
                          $m3[$q1[$q1[$q0[$i] ^ $key[20]] ^ $key[12]] ^ $key[4]];
@@ -496,8 +496,8 @@  discard block
 block discarded – undo
496 496
                          $m2[$q1[$q0[$q0[$j] ^ $key[23]] ^ $key[15]] ^ $key[7]] ^
497 497
                          $m3[$q1[$q1[$q0[$j] ^ $key[24]] ^ $key[16]] ^ $key[8]];
498 498
                     $B = ($B << 8) | ($B >> 24 & 0xff);
499
-                    $K[] = $A+= $B;
500
-                    $K[] = (($A+= $B) << 9 | $A >> 23 & 0x1ff);
499
+                    $K[] = $A += $B;
500
+                    $K[] = (($A += $B) << 9 | $A >> 23 & 0x1ff);
501 501
                 }
502 502
                 for ($i = 0; $i < 256; ++$i) {
503 503
                     $S0[$i] = $m0[$q0[$q0[$q1[$i] ^ $s8] ^ $s4] ^ $s0];
@@ -511,8 +511,8 @@  discard block
 block discarded – undo
511 511
                 list($sb, $sa, $s9, $s8) = $this->_mdsrem($le_longs[3], $le_longs[4]);
512 512
                 list($s7, $s6, $s5, $s4) = $this->_mdsrem($le_longs[5], $le_longs[6]);
513 513
                 list($s3, $s2, $s1, $s0) = $this->_mdsrem($le_longs[7], $le_longs[8]);
514
-                for ($i = 0, $j = 1; $i < 40; $i+= 2, $j+= 2) {
515
-                    $A = $m0[$q0[$q0[$q1[$q1[$i] ^ $key[25]] ^ $key[17]] ^ $key[ 9]] ^ $key[1]] ^
514
+                for ($i = 0, $j = 1; $i < 40; $i += 2, $j += 2) {
515
+                    $A = $m0[$q0[$q0[$q1[$q1[$i] ^ $key[25]] ^ $key[17]] ^ $key[9]] ^ $key[1]] ^
516 516
                          $m1[$q0[$q1[$q1[$q0[$i] ^ $key[26]] ^ $key[18]] ^ $key[10]] ^ $key[2]] ^
517 517
                          $m2[$q1[$q0[$q0[$q0[$i] ^ $key[27]] ^ $key[19]] ^ $key[11]] ^ $key[3]] ^
518 518
                          $m3[$q1[$q1[$q0[$q1[$i] ^ $key[28]] ^ $key[20]] ^ $key[12]] ^ $key[4]];
@@ -521,8 +521,8 @@  discard block
 block discarded – undo
521 521
                          $m2[$q1[$q0[$q0[$q0[$j] ^ $key[31]] ^ $key[23]] ^ $key[15]] ^ $key[7]] ^
522 522
                          $m3[$q1[$q1[$q0[$q1[$j] ^ $key[32]] ^ $key[24]] ^ $key[16]] ^ $key[8]];
523 523
                     $B = ($B << 8) | ($B >> 24 & 0xff);
524
-                    $K[] = $A+= $B;
525
-                    $K[] = (($A+= $B) << 9 | $A >> 23 & 0x1ff);
524
+                    $K[] = $A += $B;
525
+                    $K[] = (($A += $B) << 9 | $A >> 23 & 0x1ff);
526 526
                 }
527 527
                 for ($i = 0; $i < 256; ++$i) {
528 528
                     $S0[$i] = $m0[$q0[$q0[$q1[$q1[$i] ^ $sc] ^ $s8] ^ $s4] ^ $s0];
@@ -556,34 +556,34 @@  discard block
 block discarded – undo
556 556
 
557 557
             // Shift the others up.
558 558
             $B = ($B << 8) | (0xff & ($A >> 24));
559
-            $A<<= 8;
559
+            $A <<= 8;
560 560
 
561 561
             $u = $t << 1;
562 562
 
563 563
             // Subtract the modular polynomial on overflow.
564 564
             if ($t & 0x80) {
565
-                $u^= 0x14d;
565
+                $u ^= 0x14d;
566 566
             }
567 567
 
568 568
             // Remove t * (a * x^2 + 1).
569 569
             $B ^= $t ^ ($u << 16);
570 570
 
571 571
             // Form u = a*t + t/a = t*(a + 1/a).
572
-            $u^= 0x7fffffff & ($t >> 1);
572
+            $u ^= 0x7fffffff & ($t >> 1);
573 573
 
574 574
             // Add the modular polynomial on underflow.
575 575
             if ($t & 0x01) {
576
-                $u^= 0xa6 ;
576
+                $u ^= 0xa6;
577 577
             }
578 578
 
579 579
             // Remove t * (a + 1/a) * (x^3 + x).
580
-            $B^= ($u << 24) | ($u << 8);
580
+            $B ^= ($u << 24) | ($u << 8);
581 581
         }
582 582
 
583 583
         return array(
584 584
             0xff & $B >> 24,
585 585
             0xff & $B >> 16,
586
-            0xff & $B >>  8,
586
+            0xff & $B >> 8,
587 587
             0xff & $B);
588 588
     }
589 589
 
@@ -610,27 +610,27 @@  discard block
 block discarded – undo
610 610
 
611 611
         $ki = 7;
612 612
         while ($ki < 39) {
613
-            $t0 = $S0[ $R0        & 0xff] ^
614
-                  $S1[($R0 >>  8) & 0xff] ^
613
+            $t0 = $S0[$R0 & 0xff] ^
614
+                  $S1[($R0 >> 8) & 0xff] ^
615 615
                   $S2[($R0 >> 16) & 0xff] ^
616 616
                   $S3[($R0 >> 24) & 0xff];
617 617
             $t1 = $S0[($R1 >> 24) & 0xff] ^
618
-                  $S1[ $R1        & 0xff] ^
619
-                  $S2[($R1 >>  8) & 0xff] ^
618
+                  $S1[$R1 & 0xff] ^
619
+                  $S2[($R1 >> 8) & 0xff] ^
620 620
                   $S3[($R1 >> 16) & 0xff];
621
-            $R2^= $t0 + $t1 + $K[++$ki];
621
+            $R2 ^= $t0 + $t1 + $K[++$ki];
622 622
             $R2 = ($R2 >> 1 & 0x7fffffff) | ($R2 << 31);
623 623
             $R3 = ((($R3 >> 31) & 1) | ($R3 << 1)) ^ ($t0 + ($t1 << 1) + $K[++$ki]);
624 624
 
625
-            $t0 = $S0[ $R2        & 0xff] ^
626
-                  $S1[($R2 >>  8) & 0xff] ^
625
+            $t0 = $S0[$R2 & 0xff] ^
626
+                  $S1[($R2 >> 8) & 0xff] ^
627 627
                   $S2[($R2 >> 16) & 0xff] ^
628 628
                   $S3[($R2 >> 24) & 0xff];
629 629
             $t1 = $S0[($R3 >> 24) & 0xff] ^
630
-                  $S1[ $R3        & 0xff] ^
631
-                  $S2[($R3 >>  8) & 0xff] ^
630
+                  $S1[$R3 & 0xff] ^
631
+                  $S2[($R3 >> 8) & 0xff] ^
632 632
                   $S3[($R3 >> 16) & 0xff];
633
-            $R0^= ($t0 + $t1 + $K[++$ki]);
633
+            $R0 ^= ($t0 + $t1 + $K[++$ki]);
634 634
             $R0 = ($R0 >> 1 & 0x7fffffff) | ($R0 << 31);
635 635
             $R1 = ((($R1 >> 31) & 1) | ($R1 << 1)) ^ ($t0 + ($t1 << 1) + $K[++$ki]);
636 636
         }
@@ -666,27 +666,27 @@  discard block
 block discarded – undo
666 666
 
667 667
         $ki = 40;
668 668
         while ($ki > 8) {
669
-            $t0 = $S0[$R0       & 0xff] ^
670
-                  $S1[$R0 >>  8 & 0xff] ^
669
+            $t0 = $S0[$R0 & 0xff] ^
670
+                  $S1[$R0 >> 8 & 0xff] ^
671 671
                   $S2[$R0 >> 16 & 0xff] ^
672 672
                   $S3[$R0 >> 24 & 0xff];
673 673
             $t1 = $S0[$R1 >> 24 & 0xff] ^
674
-                  $S1[$R1       & 0xff] ^
675
-                  $S2[$R1 >>  8 & 0xff] ^
674
+                  $S1[$R1 & 0xff] ^
675
+                  $S2[$R1 >> 8 & 0xff] ^
676 676
                   $S3[$R1 >> 16 & 0xff];
677
-            $R3^= $t0 + ($t1 << 1) + $K[--$ki];
677
+            $R3 ^= $t0 + ($t1 << 1) + $K[--$ki];
678 678
             $R3 = $R3 >> 1 & 0x7fffffff | $R3 << 31;
679 679
             $R2 = ($R2 >> 31 & 0x1 | $R2 << 1) ^ ($t0 + $t1 + $K[--$ki]);
680 680
 
681
-            $t0 = $S0[$R2       & 0xff] ^
682
-                  $S1[$R2 >>  8 & 0xff] ^
681
+            $t0 = $S0[$R2 & 0xff] ^
682
+                  $S1[$R2 >> 8 & 0xff] ^
683 683
                   $S2[$R2 >> 16 & 0xff] ^
684 684
                   $S3[$R2 >> 24 & 0xff];
685 685
             $t1 = $S0[$R3 >> 24 & 0xff] ^
686
-                  $S1[$R3       & 0xff] ^
687
-                  $S2[$R3 >>  8 & 0xff] ^
686
+                  $S1[$R3 & 0xff] ^
687
+                  $S2[$R3 >> 8 & 0xff] ^
688 688
                   $S3[$R3 >> 16 & 0xff];
689
-            $R1^= $t0 + ($t1 << 1) + $K[--$ki];
689
+            $R1 ^= $t0 + ($t1 << 1) + $K[--$ki];
690 690
             $R1 = $R1 >> 1 & 0x7fffffff | $R1 << 31;
691 691
             $R0 = ($R0 >> 31 & 0x1 | $R0 << 1) ^ ($t0 + $t1 + $K[--$ki]);
692 692
         }
@@ -707,16 +707,16 @@  discard block
 block discarded – undo
707 707
      */
708 708
     function _setupInlineCrypt()
709 709
     {
710
-        $lambda_functions =& self::_getLambdaFunctions();
710
+        $lambda_functions = & self::_getLambdaFunctions();
711 711
 
712 712
         // Max. 10 Ultra-Hi-optimized inline-crypt functions. After that, we'll (still) create very fast code, but not the ultimate fast one.
713 713
         // (Currently, for Crypt_Twofish, one generated $lambda_function cost on php5.5@32bit ~140kb unfreeable mem and ~240kb on php5.5@64bit)
714
-        $gen_hi_opt_code = (bool)(count($lambda_functions) < 10);
714
+        $gen_hi_opt_code = (bool) (count($lambda_functions) < 10);
715 715
 
716 716
         // Generation of a unique hash for our generated code
717 717
         $code_hash = "Crypt_Twofish, {$this->mode}";
718 718
         if ($gen_hi_opt_code) {
719
-            $code_hash = str_pad($code_hash, 32) . $this->_hashInlineCryptFunction($this->key);
719
+            $code_hash = str_pad($code_hash, 32).$this->_hashInlineCryptFunction($this->key);
720 720
         }
721 721
 
722 722
         if (!isset($lambda_functions[$code_hash])) {
@@ -736,16 +736,16 @@  discard block
 block discarded – undo
736 736
                     ';
737 737
                     break;
738 738
                 default:
739
-                    $K   = array();
739
+                    $K = array();
740 740
                     for ($i = 0; $i < 40; ++$i) {
741
-                        $K[] = '$K_' . $i;
741
+                        $K[] = '$K_'.$i;
742 742
                     }
743 743
                     $init_crypt = '
744 744
                         $S0 = $self->S0;
745 745
                         $S1 = $self->S1;
746 746
                         $S2 = $self->S2;
747 747
                         $S3 = $self->S3;
748
-                        list(' . implode(',', $K) . ') = $self->K;
748
+                        list(' . implode(',', $K).') = $self->K;
749 749
                     ';
750 750
             }
751 751
 
@@ -758,7 +758,7 @@  discard block
 block discarded – undo
758 758
                 $R3 = '.$K[3].' ^ $in[4];
759 759
             ';
760 760
             for ($ki = 7, $i = 0; $i < 8; ++$i) {
761
-                $encrypt_block.= '
761
+                $encrypt_block .= '
762 762
                     $t0 = $S0[ $R0        & 0xff] ^
763 763
                           $S1[($R0 >>  8) & 0xff] ^
764 764
                           $S2[($R0 >> 16) & 0xff] ^
@@ -784,7 +784,7 @@  discard block
 block discarded – undo
784 784
                     $R1 = ((($R1 >> 31) & 1) | ($R1 << 1)) ^ ($t0 + ($t1 << 1) + '.$K[++$ki].');
785 785
                 ';
786 786
             }
787
-            $encrypt_block.= '
787
+            $encrypt_block .= '
788 788
                 $in = pack("V4", '.$K[4].' ^ $R2,
789 789
                                  '.$K[5].' ^ $R3,
790 790
                                  '.$K[6].' ^ $R0,
@@ -800,7 +800,7 @@  discard block
 block discarded – undo
800 800
                 $R3 = '.$K[7].' ^ $in[4];
801 801
             ';
802 802
             for ($ki = 40, $i = 0; $i < 8; ++$i) {
803
-                $decrypt_block.= '
803
+                $decrypt_block .= '
804 804
                     $t0 = $S0[$R0       & 0xff] ^
805 805
                           $S1[$R0 >>  8 & 0xff] ^
806 806
                           $S2[$R0 >> 16 & 0xff] ^
@@ -826,7 +826,7 @@  discard block
 block discarded – undo
826 826
                     $R0 = ($R0 >> 31 & 0x1 | $R0 << 1) ^ ($t0 + $t1 + '.$K[--$ki].');
827 827
                 ';
828 828
             }
829
-            $decrypt_block.= '
829
+            $decrypt_block .= '
830 830
                 $in = pack("V4", '.$K[0].' ^ $R2,
831 831
                                  '.$K[1].' ^ $R3,
832 832
                                  '.$K[2].' ^ $R0,
Please login to merge, or discard this patch.
includes/libraries/Authentication/phpseclib/Crypt/Blowfish.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -423,13 +423,13 @@  discard block
 block discarded – undo
423 423
             $l^= $p[$i];
424 424
             $r^= ($sb_0[$l >> 24 & 0xff]  +
425 425
                   $sb_1[$l >> 16 & 0xff]  ^
426
-                  $sb_2[$l >>  8 & 0xff]) +
426
+                    $sb_2[$l >>  8 & 0xff]) +
427 427
                   $sb_3[$l       & 0xff];
428 428
 
429 429
             $r^= $p[$i + 1];
430 430
             $l^= ($sb_0[$r >> 24 & 0xff]  +
431 431
                   $sb_1[$r >> 16 & 0xff]  ^
432
-                  $sb_2[$r >>  8 & 0xff]) +
432
+                    $sb_2[$r >>  8 & 0xff]) +
433 433
                   $sb_3[$r       & 0xff];
434 434
         }
435 435
         return pack("N*", $r ^ $p[17], $l ^ $p[16]);
@@ -458,13 +458,13 @@  discard block
 block discarded – undo
458 458
             $l^= $p[$i];
459 459
             $r^= ($sb_0[$l >> 24 & 0xff]  +
460 460
                   $sb_1[$l >> 16 & 0xff]  ^
461
-                  $sb_2[$l >>  8 & 0xff]) +
461
+                    $sb_2[$l >>  8 & 0xff]) +
462 462
                   $sb_3[$l       & 0xff];
463 463
 
464 464
             $r^= $p[$i - 1];
465 465
             $l^= ($sb_0[$r >> 24 & 0xff]  +
466 466
                   $sb_1[$r >> 16 & 0xff]  ^
467
-                  $sb_2[$r >>  8 & 0xff]) +
467
+                    $sb_2[$r >>  8 & 0xff]) +
468 468
                   $sb_3[$r       & 0xff];
469 469
         }
470 470
         return pack("N*", $r ^ $p[0], $l ^ $p[1]);
@@ -577,11 +577,11 @@  discard block
 block discarded – undo
577 577
 
578 578
             $lambda_functions[$code_hash] = $this->_createInlineCryptFunction(
579 579
                 array(
580
-                   'init_crypt'    => $init_crypt,
581
-                   'init_encrypt'  => '',
582
-                   'init_decrypt'  => '',
583
-                   'encrypt_block' => $encrypt_block,
584
-                   'decrypt_block' => $decrypt_block
580
+                    'init_crypt'    => $init_crypt,
581
+                    'init_encrypt'  => '',
582
+                    'init_decrypt'  => '',
583
+                    'encrypt_block' => $encrypt_block,
584
+                    'decrypt_block' => $decrypt_block
585 585
                 )
586 586
             );
587 587
         }
Please login to merge, or discard this patch.
Spacing   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
     function setKeyLength($length)
313 313
     {
314 314
         if ($length < 32 || $length > 448) {
315
-                throw new \LengthException('Key size of ' . $length . ' bits is not supported by this algorithm. Only keys of sizes between 32 and 448 bits are supported');
315
+                throw new \LengthException('Key size of '.$length.' bits is not supported by this algorithm. Only keys of sizes between 32 and 448 bits are supported');
316 316
         }
317 317
 
318 318
         $this->key_length = $length >> 3;
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
                 return false;
338 338
             }
339 339
             $this->cipher_name_openssl_ecb = 'bf-ecb';
340
-            $this->cipher_name_openssl = 'bf-' . $this->_openssl_translate_mode();
340
+            $this->cipher_name_openssl = 'bf-'.$this->_openssl_translate_mode();
341 341
         }
342 342
 
343 343
         return parent::isValidEngine($engine);
@@ -387,13 +387,13 @@  discard block
 block discarded – undo
387 387
         $data = "\0\0\0\0\0\0\0\0";
388 388
         for ($i = 0; $i < 18; $i += 2) {
389 389
             list($l, $r) = array_values(unpack('N*', $data = $this->_encryptBlock($data)));
390
-            $this->bctx['p'][$i    ] = $l;
390
+            $this->bctx['p'][$i] = $l;
391 391
             $this->bctx['p'][$i + 1] = $r;
392 392
         }
393 393
         for ($i = 0; $i < 4; ++$i) {
394 394
             for ($j = 0; $j < 256; $j += 2) {
395 395
                 list($l, $r) = array_values(unpack('N*', $data = $this->_encryptBlock($data)));
396
-                $this->bctx['sb'][$i][$j    ] = $l;
396
+                $this->bctx['sb'][$i][$j] = $l;
397 397
                 $this->bctx['sb'][$i][$j + 1] = $r;
398 398
             }
399 399
         }
@@ -419,18 +419,18 @@  discard block
 block discarded – undo
419 419
         $l = $in[1];
420 420
         $r = $in[2];
421 421
 
422
-        for ($i = 0; $i < 16; $i+= 2) {
423
-            $l^= $p[$i];
424
-            $r^= ($sb_0[$l >> 24 & 0xff]  +
425
-                  $sb_1[$l >> 16 & 0xff]  ^
426
-                  $sb_2[$l >>  8 & 0xff]) +
427
-                  $sb_3[$l       & 0xff];
428
-
429
-            $r^= $p[$i + 1];
430
-            $l^= ($sb_0[$r >> 24 & 0xff]  +
431
-                  $sb_1[$r >> 16 & 0xff]  ^
432
-                  $sb_2[$r >>  8 & 0xff]) +
433
-                  $sb_3[$r       & 0xff];
422
+        for ($i = 0; $i < 16; $i += 2) {
423
+            $l ^= $p[$i];
424
+            $r ^= ($sb_0[$l >> 24 & 0xff] +
425
+                  $sb_1[$l >> 16 & 0xff] ^
426
+                  $sb_2[$l >> 8 & 0xff]) +
427
+                  $sb_3[$l & 0xff];
428
+
429
+            $r ^= $p[$i + 1];
430
+            $l ^= ($sb_0[$r >> 24 & 0xff] +
431
+                  $sb_1[$r >> 16 & 0xff] ^
432
+                  $sb_2[$r >> 8 & 0xff]) +
433
+                  $sb_3[$r & 0xff];
434 434
         }
435 435
         return pack("N*", $r ^ $p[17], $l ^ $p[16]);
436 436
     }
@@ -454,18 +454,18 @@  discard block
 block discarded – undo
454 454
         $l = $in[1];
455 455
         $r = $in[2];
456 456
 
457
-        for ($i = 17; $i > 2; $i-= 2) {
458
-            $l^= $p[$i];
459
-            $r^= ($sb_0[$l >> 24 & 0xff]  +
460
-                  $sb_1[$l >> 16 & 0xff]  ^
461
-                  $sb_2[$l >>  8 & 0xff]) +
462
-                  $sb_3[$l       & 0xff];
463
-
464
-            $r^= $p[$i - 1];
465
-            $l^= ($sb_0[$r >> 24 & 0xff]  +
466
-                  $sb_1[$r >> 16 & 0xff]  ^
467
-                  $sb_2[$r >>  8 & 0xff]) +
468
-                  $sb_3[$r       & 0xff];
457
+        for ($i = 17; $i > 2; $i -= 2) {
458
+            $l ^= $p[$i];
459
+            $r ^= ($sb_0[$l >> 24 & 0xff] +
460
+                  $sb_1[$l >> 16 & 0xff] ^
461
+                  $sb_2[$l >> 8 & 0xff]) +
462
+                  $sb_3[$l & 0xff];
463
+
464
+            $r ^= $p[$i - 1];
465
+            $l ^= ($sb_0[$r >> 24 & 0xff] +
466
+                  $sb_1[$r >> 16 & 0xff] ^
467
+                  $sb_2[$r >> 8 & 0xff]) +
468
+                  $sb_3[$r & 0xff];
469 469
         }
470 470
         return pack("N*", $r ^ $p[0], $l ^ $p[1]);
471 471
     }
@@ -478,17 +478,17 @@  discard block
 block discarded – undo
478 478
      */
479 479
     function _setupInlineCrypt()
480 480
     {
481
-        $lambda_functions =& self::_getLambdaFunctions();
481
+        $lambda_functions = & self::_getLambdaFunctions();
482 482
 
483 483
         // We create max. 10 hi-optimized code for memory reason. Means: For each $key one ultra fast inline-crypt function.
484 484
         // (Currently, for Blowfish, one generated $lambda_function cost on php5.5@32bit ~100kb unfreeable mem and ~180kb on php5.5@64bit)
485 485
         // After that, we'll still create very fast optimized code but not the hi-ultimative code, for each $mode one.
486
-        $gen_hi_opt_code = (bool)(count($lambda_functions) < 10);
486
+        $gen_hi_opt_code = (bool) (count($lambda_functions) < 10);
487 487
 
488 488
         // Generation of a unique hash for our generated code
489 489
         $code_hash = "Crypt_Blowfish, {$this->mode}";
490 490
         if ($gen_hi_opt_code) {
491
-            $code_hash = str_pad($code_hash, 32) . $this->_hashInlineCryptFunction($this->key);
491
+            $code_hash = str_pad($code_hash, 32).$this->_hashInlineCryptFunction($this->key);
492 492
         }
493 493
 
494 494
         if (!isset($lambda_functions[$code_hash])) {
@@ -506,13 +506,13 @@  discard block
 block discarded – undo
506 506
                     ';
507 507
                     break;
508 508
                 default:
509
-                    $p   = array();
509
+                    $p = array();
510 510
                     for ($i = 0; $i < 18; ++$i) {
511
-                        $p[] = '$p_' . $i;
511
+                        $p[] = '$p_'.$i;
512 512
                     }
513 513
                     $init_crypt = '
514 514
                         list($sb_0, $sb_1, $sb_2, $sb_3) = $self->bctx["sb"];
515
-                        list(' . implode(',', $p) . ') = $self->bctx["p"];
515
+                        list(' . implode(',', $p).') = $self->bctx["p"];
516 516
 
517 517
                     ';
518 518
             }
@@ -523,25 +523,25 @@  discard block
 block discarded – undo
523 523
                 $l = $in[1];
524 524
                 $r = $in[2];
525 525
             ';
526
-            for ($i = 0; $i < 16; $i+= 2) {
527
-                $encrypt_block.= '
528
-                    $l^= ' . $p[$i] . ';
526
+            for ($i = 0; $i < 16; $i += 2) {
527
+                $encrypt_block .= '
528
+                    $l^= ' . $p[$i].';
529 529
                     $r^= ($sb_0[$l >> 24 & 0xff]  +
530 530
                           $sb_1[$l >> 16 & 0xff]  ^
531 531
                           $sb_2[$l >>  8 & 0xff]) +
532 532
                           $sb_3[$l       & 0xff];
533 533
 
534
-                    $r^= ' . $p[$i + 1] . ';
534
+                    $r^= ' . $p[$i + 1].';
535 535
                     $l^= ($sb_0[$r >> 24 & 0xff]  +
536 536
                           $sb_1[$r >> 16 & 0xff]  ^
537 537
                           $sb_2[$r >>  8 & 0xff]) +
538 538
                           $sb_3[$r       & 0xff];
539 539
                 ';
540 540
             }
541
-            $encrypt_block.= '
541
+            $encrypt_block .= '
542 542
                 $in = pack("N*",
543
-                    $r ^ ' . $p[17] . ',
544
-                    $l ^ ' . $p[16] . '
543
+                    $r ^ ' . $p[17].',
544
+                    $l ^ ' . $p[16].'
545 545
                 );
546 546
             ';
547 547
 
@@ -552,15 +552,15 @@  discard block
 block discarded – undo
552 552
                 $r = $in[2];
553 553
             ';
554 554
 
555
-            for ($i = 17; $i > 2; $i-= 2) {
556
-                $decrypt_block.= '
557
-                    $l^= ' . $p[$i] . ';
555
+            for ($i = 17; $i > 2; $i -= 2) {
556
+                $decrypt_block .= '
557
+                    $l^= ' . $p[$i].';
558 558
                     $r^= ($sb_0[$l >> 24 & 0xff]  +
559 559
                           $sb_1[$l >> 16 & 0xff]  ^
560 560
                           $sb_2[$l >>  8 & 0xff]) +
561 561
                           $sb_3[$l       & 0xff];
562 562
 
563
-                    $r^= ' . $p[$i - 1] . ';
563
+                    $r^= ' . $p[$i - 1].';
564 564
                     $l^= ($sb_0[$r >> 24 & 0xff]  +
565 565
                           $sb_1[$r >> 16 & 0xff]  ^
566 566
                           $sb_2[$r >>  8 & 0xff]) +
@@ -568,10 +568,10 @@  discard block
 block discarded – undo
568 568
                 ';
569 569
             }
570 570
 
571
-            $decrypt_block.= '
571
+            $decrypt_block .= '
572 572
                 $in = pack("N*",
573
-                    $r ^ ' . $p[0] . ',
574
-                    $l ^ ' . $p[1] . '
573
+                    $r ^ ' . $p[0].',
574
+                    $l ^ ' . $p[1].'
575 575
                 );
576 576
             ';
577 577
 
Please login to merge, or discard this patch.