94
94
*
95
95
* @param argc holds all command line input
96
96
* @param argv each holds one value from the command line input
97
- * @param action forwarded from wolfsslMain (-e, -d, -h, or -b)
97
+ * @param action forwarded from wolfCLU_main (-e, -d, -h, or -b)
98
98
*/
99
- int wolfsslSetup (int argc , char * * argv , char action );
99
+ int wolfCLU_setup (int argc , char * * argv , char action );
100
100
101
101
/* hash argument function
102
102
*
103
103
* @param argc holds all command line input
104
104
* @param argv each holds one value from the command line input
105
105
*/
106
- int wolfsslHashSetup (int argc , char * * argv );
106
+ int wolfCLU_hashSetup (int argc , char * * argv );
107
107
108
108
/* benchmark argument function
109
109
*
110
110
* @param argc holds all command line input
111
111
* @param argv each holds one value from the command line input
112
112
*/
113
- int wolfsslBenchSetup (int argc , char * * argv );
113
+ int wolfCLU_benchSetup (int argc , char * * argv );
114
114
115
115
/*
116
116
* generic help function
117
117
*/
118
- void wolfsslHelp (void );
118
+ void wolfCLU_help (void );
119
119
120
120
/*
121
121
* verbose help function
122
122
*/
123
- void wolfsslVerboseHelp (void );
123
+ void wolfCLU_verboseHelp (void );
124
124
125
125
/*
126
126
* encrypt help function
127
127
*/
128
- void wolfsslEncryptHelp (void );
128
+ void wolfCLU_encryptHelp (void );
129
129
130
130
/*
131
131
* decrypt help function
132
132
*/
133
- void wolfsslDecryptHelp (void );
133
+ void wolfCLU_decryptHelp (void );
134
134
135
135
/*
136
136
* hash help function
137
137
*/
138
- void wolfsslHashHelp (void );
138
+ void wolfCLU_hashHelp (void );
139
139
140
140
/*
141
141
* benchmark help function
142
142
*/
143
- void wolfsslBenchHelp (void );
143
+ void wolfCLU_benchHelp (void );
144
144
145
145
/* find algorithm for encryption/decryption
146
146
*
@@ -149,40 +149,40 @@ void wolfsslBenchHelp(void);
149
149
* @param mode the mode as set by the user (cbc or ctr)
150
150
* @param size set based on the algorithm specified
151
151
*/
152
- int wolfsslGetAlgo (char * name , char * * alg , char * * mode , int * size );
152
+ int wolfCLU_getAlgo (char * name , char * * alg , char * * mode , int * size );
153
153
154
154
/* generates key based on password provided
155
155
*
156
156
* @param rng the random number generator
157
157
* @param pwdKey the password based key as provided by the user
158
- * @param size size as determined by wolfsslGetAlgo
158
+ * @param size size as determined by wolfCLU_GetAlgo
159
159
* @param salt the buffer to store the resulting salt after it's generated
160
160
* @param pad a flag to let us know if there are padded bytes or not
161
161
*/
162
- int wolfsslGenKey (RNG * rng , byte * pwdKey , int size , byte * salt , int pad );
162
+ int wolfCLU_genKey (RNG * rng , byte * pwdKey , int size , byte * salt , int pad );
163
163
164
164
/* secure entry of password
165
165
*
166
166
* @param pwdKey the password provide by the user
167
- * @param size the size as determnined by wolfsslGetAlgo
167
+ * @param size the size as determnined by wolfCLU_GetAlgo
168
168
*/
169
- int wolfsslNoEcho (char * pwdKey , int size );
169
+ int wolfCLU_noEcho (char * pwdKey , int size );
170
170
171
171
/* adds characters to end of string
172
172
*
173
173
* @param s the char array we'll be appending to
174
174
* @param c the char that will be appended to s
175
175
*/
176
- void wolfsslAppend (char * s , char c );
176
+ void wolfCLU_append (char * s , char c );
177
177
178
178
/* interrupt function
179
179
*
180
180
* @param signo gets type cast to void, interrupts the loop.
181
181
*/
182
- void wolfsslStop (int signo );
182
+ void wolfCLU_stop (int signo );
183
183
184
184
/* finds current time during runtime */
185
- double wolfsslGetTime (void );
185
+ double wolfCLU_getTime (void );
186
186
187
187
/* A function to convert from Hex to Binary
188
188
*
@@ -199,7 +199,7 @@ double wolfsslGetTime(void);
199
199
* @param b3Sz a word32 that will be set after conversion of b3, can be NULL
200
200
* @param b4Sz a word32 that will be set after conversion of b4, can be NULL
201
201
*/
202
- int wolfsslHexToBin (const char * h1 , byte * * b1 , word32 * b1Sz ,
202
+ int wolfCLU_hexToBin (const char * h1 , byte * * b1 , word32 * b1Sz ,
203
203
const char * h2 , byte * * b2 , word32 * b2Sz ,
204
204
const char * h3 , byte * * b3 , word32 * b3Sz ,
205
205
const char * h4 , byte * * b4 , word32 * b4Sz );
@@ -212,14 +212,14 @@ int wolfsslHexToBin(const char* h1, byte** b1, word32* b1Sz,
212
212
* @param b4 a buffer to be freed, can be set to NULL
213
213
* @param b5 a buffer to be freed, can be set to NULL
214
214
*/
215
- void wolfsslFreeBins (byte * b1 , byte * b2 , byte * b3 , byte * b4 , byte * b5 );
215
+ void wolfCLU_freeBins (byte * b1 , byte * b2 , byte * b3 , byte * b4 , byte * b5 );
216
216
217
217
/* function to display stats results from benchmark
218
218
*
219
219
* @param start the time when the benchmark was started
220
220
* @param blockSize the block size of the algorithm being benchmarked
221
221
*/
222
- void wolfsslStats (double start , int blockSize , int64_t blocks );
222
+ void wolfCLU_stats (double start , int blockSize , int64_t blocks );
223
223
224
224
/* encryption function
225
225
*
@@ -230,15 +230,15 @@ void wolfsslStats(double start, int blockSize, int64_t blocks);
230
230
* @param pwdKey this is the user provided password to be used as the key
231
231
* @param key if entered must be in hex, can be used to verify encryption with
232
232
* nist test vectors.
233
- * @param size this is set by wolfsslGetAlgo and is used to stretch the password
233
+ * @param size this is set by wolfCLU_GetAlgo and is used to stretch the password
234
234
* @param in the filename or user input from command line
235
235
* @param out the filename to output following en/de cryption
236
236
* @param iv if entered must be in hex otherwise generated at run time
237
237
* @param block size of block as determined by the algorithm being used
238
238
* @param ivCheck a flag if user inputs a specific IV
239
239
* @param inputHex a flag to specify encrypting hex data, instead of byte data
240
240
*/
241
- int wolfsslEncrypt (char * alg , char * mode , byte * pwdKey , byte * key , int size ,
241
+ int wolfCLU_encrypt (char * alg , char * mode , byte * pwdKey , byte * key , int size ,
242
242
char * in , char * out , byte * iv , int block ,
243
243
int ivCheck , int inputHex );
244
244
@@ -251,23 +251,23 @@ int wolfsslEncrypt(char* alg, char* mode, byte* pwdKey, byte* key, int size,
251
251
* @param pwdKey this is the user provided password to be used as the key
252
252
* @param key if entered must be in hex, can be used to verify encryption with
253
253
* nist test vectors.
254
- * @param size this is set by wolfsslGetAlgo and is used to stretch the password
254
+ * @param size this is set by wolfCLU_GetAlgo and is used to stretch the password
255
255
* @param in the filename or user input from command line
256
256
* @param out the filename to output following en/de cryption
257
257
* @param iv if entered must be in hex otherwise generated at run time
258
258
* @param block size of block as determined by the algorithm being used
259
259
* @param keyType let's decrypt know if it's using a password based key or a
260
260
* hexidecimal, user specified key.
261
261
*/
262
- int wolfsslDecrypt (char * alg , char * mode , byte * pwdKey , byte * key , int size ,
262
+ int wolfCLU_decrypt (char * alg , char * mode , byte * pwdKey , byte * key , int size ,
263
263
char * in , char * out , byte * iv , int block , int keyType );
264
264
265
265
/* benchmarking function
266
266
*
267
267
* @param timer a timer to be started and stopped for benchmarking purposes
268
268
* @param option a flag to allow benchmark execution
269
269
*/
270
- int wolfsslBenchmark (int timer , int * option );
270
+ int wolfCLU_benchmark (int timer , int * option );
271
271
272
272
/* hashing function
273
273
*
@@ -277,11 +277,11 @@ int wolfsslBenchmark(int timer, int* option);
277
277
* @param alg
278
278
* @param size
279
279
*/
280
- int wolfsslHash (char * in , char * out , char * alg , int size );
280
+ int wolfCLU_hash (char * in , char * out , char * alg , int size );
281
281
/*
282
282
* get the current Version
283
283
*/
284
- void wolfsslVersion (void );
284
+ void wolfCLU_version (void );
285
285
#endif
286
286
287
287
#endif /* _WOLFSSL_CLU_HEADER_ */
0 commit comments