cordova-plugin-mserviceinterface-2.0 1.0.21 → 1.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/package.json +28 -28
  2. package/plugin.xml +153 -153
  3. package/src/android/CallbackProgressDialog.java +53 -53
  4. package/src/android/FileProvider.java +7 -7
  5. package/src/android/backgroundNotification.java +120 -120
  6. package/src/android/doubleogradle.gradle +5 -5
  7. package/src/android/mInterface.java +2087 -2066
  8. package/src/android/mInterfaceReceiver.java +59 -59
  9. package/src/android/mInterfaceService.java +749 -749
  10. package/src/android/mInterfaceUtil.java +1686 -1688
  11. package/src/android/res/xml/network_security_config.xml +8 -8
  12. package/src/android/res/xml/opener_paths.xml +16 -16
  13. package/src/ios/InternetConnection.h +64 -64
  14. package/src/ios/InternetConnection.m +242 -242
  15. package/src/ios/SSZipArchive.h +146 -146
  16. package/src/ios/SSZipArchive.m +1180 -1180
  17. package/src/ios/SSZipCommon.h +66 -66
  18. package/src/ios/UICKeyChainStore.h +64 -64
  19. package/src/ios/UICKeyChainStore.m +434 -434
  20. package/src/ios/XMLConverter.h +61 -61
  21. package/src/ios/XMLConverter.m +243 -243
  22. package/src/ios/ZipArchive.h +19 -19
  23. package/src/ios/aes/aes.h +270 -270
  24. package/src/ios/aes/aes_ni.c +687 -687
  25. package/src/ios/aes/aes_ni.h +59 -59
  26. package/src/ios/aes/aescrypt.c +301 -301
  27. package/src/ios/aes/aeskey.c +554 -554
  28. package/src/ios/aes/aesopt.h +776 -776
  29. package/src/ios/aes/aestab.c +418 -418
  30. package/src/ios/aes/aestab.h +173 -173
  31. package/src/ios/aes/brg_endian.h +127 -127
  32. package/src/ios/aes/brg_types.h +191 -191
  33. package/src/ios/aes/fileenc.c +145 -145
  34. package/src/ios/aes/fileenc.h +121 -121
  35. package/src/ios/aes/hmac.c +209 -209
  36. package/src/ios/aes/hmac.h +119 -119
  37. package/src/ios/aes/prng.c +155 -155
  38. package/src/ios/aes/prng.h +82 -82
  39. package/src/ios/aes/pwd2key.c +181 -181
  40. package/src/ios/aes/pwd2key.h +45 -45
  41. package/src/ios/aes/sha1.c +283 -283
  42. package/src/ios/aes/sha1.h +72 -72
  43. package/src/ios/mInterface.h +2 -0
  44. package/src/ios/mInterface.m +18 -1
  45. package/src/ios/minizip/crypt.c +146 -146
  46. package/src/ios/minizip/crypt.h +66 -66
  47. package/src/ios/minizip/ioapi.c +353 -353
  48. package/src/ios/minizip/ioapi.h +154 -154
  49. package/src/ios/minizip/ioapi_buf.c +452 -452
  50. package/src/ios/minizip/ioapi_buf.h +52 -52
  51. package/src/ios/minizip/ioapi_mem.c +167 -167
  52. package/src/ios/minizip/ioapi_mem.h +52 -52
  53. package/src/ios/minizip/minishared.c +292 -292
  54. package/src/ios/minizip/minishared.h +50 -50
  55. package/src/ios/minizip/unzip.c +2007 -2007
  56. package/src/ios/minizip/unzip.h +254 -254
  57. package/src/ios/minizip/zip.c +2007 -2007
  58. package/src/ios/minizip/zip.h +215 -215
  59. package/www/mInterface.js +3 -3
package/src/ios/aes/aes.h CHANGED
@@ -1,270 +1,270 @@
1
- /*
2
- ---------------------------------------------------------------------------
3
- Copyright (c) 1998-2013, Brian Gladman, Worcester, UK. All rights reserved.
4
-
5
- The redistribution and use of this software (with or without changes)
6
- is allowed without the payment of fees or royalties provided that:
7
-
8
- source code distributions include the above copyright notice, this
9
- list of conditions and the following disclaimer;
10
-
11
- binary distributions include the above copyright notice, this list
12
- of conditions and the following disclaimer in their documentation.
13
-
14
- This software is provided 'as is' with no explicit or implied warranties
15
- in respect of its operation, including, but not limited to, correctness
16
- and fitness for purpose.
17
- ---------------------------------------------------------------------------
18
- Issue Date: 20/12/2007
19
-
20
- This file contains the definitions required to use AES in C. See aesopt.h
21
- for optimisation details.
22
- */
23
-
24
- #ifndef _AES_H
25
- #define _AES_H
26
-
27
- #include <stdlib.h>
28
-
29
- /* This include is used to find 8 & 32 bit unsigned integer types */
30
- #include "brg_types.h"
31
-
32
- #if defined(__cplusplus)
33
- extern "C"
34
- {
35
- #endif
36
-
37
- #define AES_128 /* if a fast 128 bit key scheduler is needed */
38
- #define AES_192 /* if a fast 192 bit key scheduler is needed */
39
- #define AES_256 /* if a fast 256 bit key scheduler is needed */
40
- #define AES_VAR /* if variable key size scheduler is needed */
41
- #define AES_MODES /* if support is needed for modes */
42
-
43
- /* The following must also be set in assembler files if being used */
44
-
45
- #define AES_ENCRYPT /* if support for encryption is needed */
46
- #define AES_DECRYPT /* if support for decryption is needed */
47
-
48
- #define AES_BLOCK_SIZE 16 /* the AES block size in bytes */
49
- #define N_COLS 4 /* the number of columns in the state */
50
-
51
- /* The key schedule length is 11, 13 or 15 16-byte blocks for 128, */
52
- /* 192 or 256-bit keys respectively. That is 176, 208 or 240 bytes */
53
- /* or 44, 52 or 60 32-bit words. */
54
-
55
- #if defined( AES_VAR ) || defined( AES_256 )
56
- #define KS_LENGTH 60
57
- #elif defined( AES_192 )
58
- #define KS_LENGTH 52
59
- #else
60
- #define KS_LENGTH 44
61
- #endif
62
-
63
- #define AES_RETURN INT_RETURN
64
-
65
- /* the character array 'inf' in the following structures is used */
66
- /* to hold AES context information. This AES code uses cx->inf.b[0] */
67
- /* to hold the number of rounds multiplied by 16. The other three */
68
- /* elements can be used by code that implements additional modes */
69
-
70
- typedef union
71
- { uint32_t l;
72
- uint8_t b[4];
73
- } aes_inf;
74
-
75
- #ifdef _MSC_VER
76
- # pragma warning( disable : 4324 )
77
- #endif
78
-
79
- #if defined(_MSC_VER) && defined(_WIN64)
80
- #define ALIGNED_(x) __declspec(align(x))
81
- #elif defined(__GNUC__) && defined(__x86_64__)
82
- #define ALIGNED_(x) __attribute__ ((aligned(x)))
83
- #else
84
- #define ALIGNED_(x)
85
- #endif
86
-
87
- typedef struct ALIGNED_(16)
88
- { uint32_t ks[KS_LENGTH];
89
- aes_inf inf;
90
- } aes_encrypt_ctx;
91
-
92
- typedef struct ALIGNED_(16)
93
- { uint32_t ks[KS_LENGTH];
94
- aes_inf inf;
95
- } aes_decrypt_ctx;
96
-
97
- #ifdef _MSC_VER
98
- # pragma warning( default : 4324 )
99
- #endif
100
-
101
- /* This routine must be called before first use if non-static */
102
- /* tables are being used */
103
-
104
- AES_RETURN aes_init(void);
105
-
106
- /* Key lengths in the range 16 <= key_len <= 32 are given in bytes, */
107
- /* those in the range 128 <= key_len <= 256 are given in bits */
108
-
109
- #if defined( AES_ENCRYPT )
110
-
111
- #if defined( AES_128 ) || defined( AES_VAR)
112
- AES_RETURN aes_encrypt_key128(const unsigned char *key, aes_encrypt_ctx cx[1]);
113
- #endif
114
-
115
- #if defined( AES_192 ) || defined( AES_VAR)
116
- AES_RETURN aes_encrypt_key192(const unsigned char *key, aes_encrypt_ctx cx[1]);
117
- #endif
118
-
119
- #if defined( AES_256 ) || defined( AES_VAR)
120
- AES_RETURN aes_encrypt_key256(const unsigned char *key, aes_encrypt_ctx cx[1]);
121
- #endif
122
-
123
- #if defined( AES_VAR )
124
- AES_RETURN aes_encrypt_key(const unsigned char *key, int key_len, aes_encrypt_ctx cx[1]);
125
- #endif
126
-
127
- AES_RETURN aes_encrypt(const unsigned char *in, unsigned char *out, const aes_encrypt_ctx cx[1]);
128
-
129
- #endif
130
-
131
- #if defined( AES_DECRYPT )
132
-
133
- #if defined( AES_128 ) || defined( AES_VAR)
134
- AES_RETURN aes_decrypt_key128(const unsigned char *key, aes_decrypt_ctx cx[1]);
135
- #endif
136
-
137
- #if defined( AES_192 ) || defined( AES_VAR)
138
- AES_RETURN aes_decrypt_key192(const unsigned char *key, aes_decrypt_ctx cx[1]);
139
- #endif
140
-
141
- #if defined( AES_256 ) || defined( AES_VAR)
142
- AES_RETURN aes_decrypt_key256(const unsigned char *key, aes_decrypt_ctx cx[1]);
143
- #endif
144
-
145
- #if defined( AES_VAR )
146
- AES_RETURN aes_decrypt_key(const unsigned char *key, int key_len, aes_decrypt_ctx cx[1]);
147
- #endif
148
-
149
- AES_RETURN aes_decrypt(const unsigned char *in, unsigned char *out, const aes_decrypt_ctx cx[1]);
150
-
151
- #endif
152
-
153
- #if defined( AES_MODES )
154
-
155
- /* Multiple calls to the following subroutines for multiple block */
156
- /* ECB, CBC, CFB, OFB and CTR mode encryption can be used to handle */
157
- /* long messages incrementally provided that the context AND the iv */
158
- /* are preserved between all such calls. For the ECB and CBC modes */
159
- /* each individual call within a series of incremental calls must */
160
- /* process only full blocks (i.e. len must be a multiple of 16) but */
161
- /* the CFB, OFB and CTR mode calls can handle multiple incremental */
162
- /* calls of any length. Each mode is reset when a new AES key is */
163
- /* set but ECB needs no reset and CBC can be reset without setting */
164
- /* a new key by setting a new IV value. To reset CFB, OFB and CTR */
165
- /* without setting the key, aes_mode_reset() must be called and the */
166
- /* IV must be set. NOTE: All these calls update the IV on exit so */
167
- /* this has to be reset if a new operation with the same IV as the */
168
- /* previous one is required (or decryption follows encryption with */
169
- /* the same IV array). */
170
-
171
- AES_RETURN aes_test_alignment_detection(unsigned int n);
172
-
173
- AES_RETURN aes_ecb_encrypt(const unsigned char *ibuf, unsigned char *obuf,
174
- int len, const aes_encrypt_ctx cx[1]);
175
-
176
- AES_RETURN aes_ecb_decrypt(const unsigned char *ibuf, unsigned char *obuf,
177
- int len, const aes_decrypt_ctx cx[1]);
178
-
179
- AES_RETURN aes_cbc_encrypt(const unsigned char *ibuf, unsigned char *obuf,
180
- int len, unsigned char *iv, const aes_encrypt_ctx cx[1]);
181
-
182
- AES_RETURN aes_cbc_decrypt(const unsigned char *ibuf, unsigned char *obuf,
183
- int len, unsigned char *iv, const aes_decrypt_ctx cx[1]);
184
-
185
- AES_RETURN aes_mode_reset(aes_encrypt_ctx cx[1]);
186
-
187
- AES_RETURN aes_cfb_encrypt(const unsigned char *ibuf, unsigned char *obuf,
188
- int len, unsigned char *iv, aes_encrypt_ctx cx[1]);
189
-
190
- AES_RETURN aes_cfb_decrypt(const unsigned char *ibuf, unsigned char *obuf,
191
- int len, unsigned char *iv, aes_encrypt_ctx cx[1]);
192
-
193
- #define aes_ofb_encrypt aes_ofb_crypt
194
- #define aes_ofb_decrypt aes_ofb_crypt
195
-
196
- AES_RETURN aes_ofb_crypt(const unsigned char *ibuf, unsigned char *obuf,
197
- int len, unsigned char *iv, aes_encrypt_ctx cx[1]);
198
-
199
- typedef void cbuf_inc(unsigned char *cbuf);
200
-
201
- #define aes_ctr_encrypt aes_ctr_crypt
202
- #define aes_ctr_decrypt aes_ctr_crypt
203
-
204
- AES_RETURN aes_ctr_crypt(const unsigned char *ibuf, unsigned char *obuf,
205
- int len, unsigned char *cbuf, cbuf_inc ctr_inc, aes_encrypt_ctx cx[1]);
206
-
207
- #endif
208
-
209
- #if 0
210
- # define ADD_AESNI_MODE_CALLS
211
- #endif
212
-
213
- #if 0 && defined( ADD_AESNI_MODE_CALLS )
214
- # define USE_AES_CONTEXT
215
- #endif
216
-
217
- #ifdef ADD_AESNI_MODE_CALLS
218
- # ifdef USE_AES_CONTEXT
219
-
220
- AES_RETURN aes_CBC_encrypt(const unsigned char *in,
221
- unsigned char *out,
222
- unsigned char ivec[16],
223
- unsigned long length,
224
- const aes_encrypt_ctx cx[1]);
225
-
226
- AES_RETURN aes_CBC_decrypt(const unsigned char *in,
227
- unsigned char *out,
228
- unsigned char ivec[16],
229
- unsigned long length,
230
- const aes_decrypt_ctx cx[1]);
231
-
232
- AES_RETURN AES_CTR_encrypt(const unsigned char *in,
233
- unsigned char *out,
234
- const unsigned char ivec[8],
235
- const unsigned char nonce[4],
236
- unsigned long length,
237
- const aes_encrypt_ctx cx[1]);
238
-
239
- # else
240
-
241
- void aes_CBC_encrypt(const unsigned char *in,
242
- unsigned char *out,
243
- unsigned char ivec[16],
244
- unsigned long length,
245
- unsigned char *key,
246
- int number_of_rounds);
247
-
248
- void aes_CBC_decrypt(const unsigned char *in,
249
- unsigned char *out,
250
- unsigned char ivec[16],
251
- unsigned long length,
252
- unsigned char *key,
253
- int number_of_rounds);
254
-
255
- void AES_CTR_encrypt(const unsigned char *in,
256
- unsigned char *out,
257
- const unsigned char ivec[8],
258
- const unsigned char nonce[4],
259
- unsigned long length,
260
- const unsigned char *key,
261
- int number_of_rounds);
262
-
263
- # endif
264
- #endif
265
-
266
- #if defined(__cplusplus)
267
- }
268
- #endif
269
-
270
- #endif
1
+ /*
2
+ ---------------------------------------------------------------------------
3
+ Copyright (c) 1998-2013, Brian Gladman, Worcester, UK. All rights reserved.
4
+
5
+ The redistribution and use of this software (with or without changes)
6
+ is allowed without the payment of fees or royalties provided that:
7
+
8
+ source code distributions include the above copyright notice, this
9
+ list of conditions and the following disclaimer;
10
+
11
+ binary distributions include the above copyright notice, this list
12
+ of conditions and the following disclaimer in their documentation.
13
+
14
+ This software is provided 'as is' with no explicit or implied warranties
15
+ in respect of its operation, including, but not limited to, correctness
16
+ and fitness for purpose.
17
+ ---------------------------------------------------------------------------
18
+ Issue Date: 20/12/2007
19
+
20
+ This file contains the definitions required to use AES in C. See aesopt.h
21
+ for optimisation details.
22
+ */
23
+
24
+ #ifndef _AES_H
25
+ #define _AES_H
26
+
27
+ #include <stdlib.h>
28
+
29
+ /* This include is used to find 8 & 32 bit unsigned integer types */
30
+ #include "brg_types.h"
31
+
32
+ #if defined(__cplusplus)
33
+ extern "C"
34
+ {
35
+ #endif
36
+
37
+ #define AES_128 /* if a fast 128 bit key scheduler is needed */
38
+ #define AES_192 /* if a fast 192 bit key scheduler is needed */
39
+ #define AES_256 /* if a fast 256 bit key scheduler is needed */
40
+ #define AES_VAR /* if variable key size scheduler is needed */
41
+ #define AES_MODES /* if support is needed for modes */
42
+
43
+ /* The following must also be set in assembler files if being used */
44
+
45
+ #define AES_ENCRYPT /* if support for encryption is needed */
46
+ #define AES_DECRYPT /* if support for decryption is needed */
47
+
48
+ #define AES_BLOCK_SIZE 16 /* the AES block size in bytes */
49
+ #define N_COLS 4 /* the number of columns in the state */
50
+
51
+ /* The key schedule length is 11, 13 or 15 16-byte blocks for 128, */
52
+ /* 192 or 256-bit keys respectively. That is 176, 208 or 240 bytes */
53
+ /* or 44, 52 or 60 32-bit words. */
54
+
55
+ #if defined( AES_VAR ) || defined( AES_256 )
56
+ #define KS_LENGTH 60
57
+ #elif defined( AES_192 )
58
+ #define KS_LENGTH 52
59
+ #else
60
+ #define KS_LENGTH 44
61
+ #endif
62
+
63
+ #define AES_RETURN INT_RETURN
64
+
65
+ /* the character array 'inf' in the following structures is used */
66
+ /* to hold AES context information. This AES code uses cx->inf.b[0] */
67
+ /* to hold the number of rounds multiplied by 16. The other three */
68
+ /* elements can be used by code that implements additional modes */
69
+
70
+ typedef union
71
+ { uint32_t l;
72
+ uint8_t b[4];
73
+ } aes_inf;
74
+
75
+ #ifdef _MSC_VER
76
+ # pragma warning( disable : 4324 )
77
+ #endif
78
+
79
+ #if defined(_MSC_VER) && defined(_WIN64)
80
+ #define ALIGNED_(x) __declspec(align(x))
81
+ #elif defined(__GNUC__) && defined(__x86_64__)
82
+ #define ALIGNED_(x) __attribute__ ((aligned(x)))
83
+ #else
84
+ #define ALIGNED_(x)
85
+ #endif
86
+
87
+ typedef struct ALIGNED_(16)
88
+ { uint32_t ks[KS_LENGTH];
89
+ aes_inf inf;
90
+ } aes_encrypt_ctx;
91
+
92
+ typedef struct ALIGNED_(16)
93
+ { uint32_t ks[KS_LENGTH];
94
+ aes_inf inf;
95
+ } aes_decrypt_ctx;
96
+
97
+ #ifdef _MSC_VER
98
+ # pragma warning( default : 4324 )
99
+ #endif
100
+
101
+ /* This routine must be called before first use if non-static */
102
+ /* tables are being used */
103
+
104
+ AES_RETURN aes_init(void);
105
+
106
+ /* Key lengths in the range 16 <= key_len <= 32 are given in bytes, */
107
+ /* those in the range 128 <= key_len <= 256 are given in bits */
108
+
109
+ #if defined( AES_ENCRYPT )
110
+
111
+ #if defined( AES_128 ) || defined( AES_VAR)
112
+ AES_RETURN aes_encrypt_key128(const unsigned char *key, aes_encrypt_ctx cx[1]);
113
+ #endif
114
+
115
+ #if defined( AES_192 ) || defined( AES_VAR)
116
+ AES_RETURN aes_encrypt_key192(const unsigned char *key, aes_encrypt_ctx cx[1]);
117
+ #endif
118
+
119
+ #if defined( AES_256 ) || defined( AES_VAR)
120
+ AES_RETURN aes_encrypt_key256(const unsigned char *key, aes_encrypt_ctx cx[1]);
121
+ #endif
122
+
123
+ #if defined( AES_VAR )
124
+ AES_RETURN aes_encrypt_key(const unsigned char *key, int key_len, aes_encrypt_ctx cx[1]);
125
+ #endif
126
+
127
+ AES_RETURN aes_encrypt(const unsigned char *in, unsigned char *out, const aes_encrypt_ctx cx[1]);
128
+
129
+ #endif
130
+
131
+ #if defined( AES_DECRYPT )
132
+
133
+ #if defined( AES_128 ) || defined( AES_VAR)
134
+ AES_RETURN aes_decrypt_key128(const unsigned char *key, aes_decrypt_ctx cx[1]);
135
+ #endif
136
+
137
+ #if defined( AES_192 ) || defined( AES_VAR)
138
+ AES_RETURN aes_decrypt_key192(const unsigned char *key, aes_decrypt_ctx cx[1]);
139
+ #endif
140
+
141
+ #if defined( AES_256 ) || defined( AES_VAR)
142
+ AES_RETURN aes_decrypt_key256(const unsigned char *key, aes_decrypt_ctx cx[1]);
143
+ #endif
144
+
145
+ #if defined( AES_VAR )
146
+ AES_RETURN aes_decrypt_key(const unsigned char *key, int key_len, aes_decrypt_ctx cx[1]);
147
+ #endif
148
+
149
+ AES_RETURN aes_decrypt(const unsigned char *in, unsigned char *out, const aes_decrypt_ctx cx[1]);
150
+
151
+ #endif
152
+
153
+ #if defined( AES_MODES )
154
+
155
+ /* Multiple calls to the following subroutines for multiple block */
156
+ /* ECB, CBC, CFB, OFB and CTR mode encryption can be used to handle */
157
+ /* long messages incrementally provided that the context AND the iv */
158
+ /* are preserved between all such calls. For the ECB and CBC modes */
159
+ /* each individual call within a series of incremental calls must */
160
+ /* process only full blocks (i.e. len must be a multiple of 16) but */
161
+ /* the CFB, OFB and CTR mode calls can handle multiple incremental */
162
+ /* calls of any length. Each mode is reset when a new AES key is */
163
+ /* set but ECB needs no reset and CBC can be reset without setting */
164
+ /* a new key by setting a new IV value. To reset CFB, OFB and CTR */
165
+ /* without setting the key, aes_mode_reset() must be called and the */
166
+ /* IV must be set. NOTE: All these calls update the IV on exit so */
167
+ /* this has to be reset if a new operation with the same IV as the */
168
+ /* previous one is required (or decryption follows encryption with */
169
+ /* the same IV array). */
170
+
171
+ AES_RETURN aes_test_alignment_detection(unsigned int n);
172
+
173
+ AES_RETURN aes_ecb_encrypt(const unsigned char *ibuf, unsigned char *obuf,
174
+ int len, const aes_encrypt_ctx cx[1]);
175
+
176
+ AES_RETURN aes_ecb_decrypt(const unsigned char *ibuf, unsigned char *obuf,
177
+ int len, const aes_decrypt_ctx cx[1]);
178
+
179
+ AES_RETURN aes_cbc_encrypt(const unsigned char *ibuf, unsigned char *obuf,
180
+ int len, unsigned char *iv, const aes_encrypt_ctx cx[1]);
181
+
182
+ AES_RETURN aes_cbc_decrypt(const unsigned char *ibuf, unsigned char *obuf,
183
+ int len, unsigned char *iv, const aes_decrypt_ctx cx[1]);
184
+
185
+ AES_RETURN aes_mode_reset(aes_encrypt_ctx cx[1]);
186
+
187
+ AES_RETURN aes_cfb_encrypt(const unsigned char *ibuf, unsigned char *obuf,
188
+ int len, unsigned char *iv, aes_encrypt_ctx cx[1]);
189
+
190
+ AES_RETURN aes_cfb_decrypt(const unsigned char *ibuf, unsigned char *obuf,
191
+ int len, unsigned char *iv, aes_encrypt_ctx cx[1]);
192
+
193
+ #define aes_ofb_encrypt aes_ofb_crypt
194
+ #define aes_ofb_decrypt aes_ofb_crypt
195
+
196
+ AES_RETURN aes_ofb_crypt(const unsigned char *ibuf, unsigned char *obuf,
197
+ int len, unsigned char *iv, aes_encrypt_ctx cx[1]);
198
+
199
+ typedef void cbuf_inc(unsigned char *cbuf);
200
+
201
+ #define aes_ctr_encrypt aes_ctr_crypt
202
+ #define aes_ctr_decrypt aes_ctr_crypt
203
+
204
+ AES_RETURN aes_ctr_crypt(const unsigned char *ibuf, unsigned char *obuf,
205
+ int len, unsigned char *cbuf, cbuf_inc ctr_inc, aes_encrypt_ctx cx[1]);
206
+
207
+ #endif
208
+
209
+ #if 0
210
+ # define ADD_AESNI_MODE_CALLS
211
+ #endif
212
+
213
+ #if 0 && defined( ADD_AESNI_MODE_CALLS )
214
+ # define USE_AES_CONTEXT
215
+ #endif
216
+
217
+ #ifdef ADD_AESNI_MODE_CALLS
218
+ # ifdef USE_AES_CONTEXT
219
+
220
+ AES_RETURN aes_CBC_encrypt(const unsigned char *in,
221
+ unsigned char *out,
222
+ unsigned char ivec[16],
223
+ unsigned long length,
224
+ const aes_encrypt_ctx cx[1]);
225
+
226
+ AES_RETURN aes_CBC_decrypt(const unsigned char *in,
227
+ unsigned char *out,
228
+ unsigned char ivec[16],
229
+ unsigned long length,
230
+ const aes_decrypt_ctx cx[1]);
231
+
232
+ AES_RETURN AES_CTR_encrypt(const unsigned char *in,
233
+ unsigned char *out,
234
+ const unsigned char ivec[8],
235
+ const unsigned char nonce[4],
236
+ unsigned long length,
237
+ const aes_encrypt_ctx cx[1]);
238
+
239
+ # else
240
+
241
+ void aes_CBC_encrypt(const unsigned char *in,
242
+ unsigned char *out,
243
+ unsigned char ivec[16],
244
+ unsigned long length,
245
+ unsigned char *key,
246
+ int number_of_rounds);
247
+
248
+ void aes_CBC_decrypt(const unsigned char *in,
249
+ unsigned char *out,
250
+ unsigned char ivec[16],
251
+ unsigned long length,
252
+ unsigned char *key,
253
+ int number_of_rounds);
254
+
255
+ void AES_CTR_encrypt(const unsigned char *in,
256
+ unsigned char *out,
257
+ const unsigned char ivec[8],
258
+ const unsigned char nonce[4],
259
+ unsigned long length,
260
+ const unsigned char *key,
261
+ int number_of_rounds);
262
+
263
+ # endif
264
+ #endif
265
+
266
+ #if defined(__cplusplus)
267
+ }
268
+ #endif
269
+
270
+ #endif