@@ -23,6 +23,7 @@ stse_ReturnCode_t stse_aes_ecb_encrypt(
2323 PLAT_UI16 message_length ,
2424 PLAT_UI8 * pPlaintext_message ,
2525 PLAT_UI8 * pEncrypted_message ) {
26+ #ifdef STSE_CONF_STSAFE_A_SUPPORT
2627 if (pSTSE == NULL ) {
2728 return (STSE_API_HANDLER_NOT_INITIALISED );
2829 }
@@ -33,6 +34,9 @@ stse_ReturnCode_t stse_aes_ecb_encrypt(
3334 message_length ,
3435 pPlaintext_message ,
3536 pEncrypted_message );
37+ #else
38+ return STSE_API_INCOMPATIBLE_DEVICE_TYPE ;
39+ #endif /* STSE_CONF_STSAFE_A_SUPPORT */
3640}
3741
3842stse_ReturnCode_t stse_aes_ecb_decrypt (
@@ -41,6 +45,7 @@ stse_ReturnCode_t stse_aes_ecb_decrypt(
4145 PLAT_UI16 message_length ,
4246 PLAT_UI8 * pEncrypted_message ,
4347 PLAT_UI8 * pPlaintext_message ) {
48+ #ifdef STSE_CONF_STSAFE_A_SUPPORT
4449 if (pSTSE == NULL ) {
4550 return (STSE_API_HANDLER_NOT_INITIALISED );
4651 }
@@ -51,6 +56,9 @@ stse_ReturnCode_t stse_aes_ecb_decrypt(
5156 message_length ,
5257 pEncrypted_message ,
5358 pPlaintext_message );
59+ #else
60+ return STSE_API_INCOMPATIBLE_DEVICE_TYPE ;
61+ #endif /* STSE_CONF_STSAFE_A_SUPPORT */
5462}
5563
5664stse_ReturnCode_t stse_aes_ccm_encrypt (
@@ -63,7 +71,7 @@ stse_ReturnCode_t stse_aes_ccm_encrypt(
6371 PLAT_UI8 * pEncrypted_message ,
6472 PLAT_UI8 * pEncrypted_authentication_tag ,
6573 PLAT_UI8 counter_presence , PLAT_UI32 * pCounter ) {
66-
74+ #ifdef STSE_CONF_STSAFE_A_SUPPORT
6775 if (pSTSE == NULL ) {
6876 return (STSE_API_HANDLER_NOT_INITIALISED );
6977 }
@@ -79,6 +87,9 @@ stse_ReturnCode_t stse_aes_ccm_encrypt(
7987 pEncrypted_message ,
8088 pEncrypted_authentication_tag ,
8189 counter_presence , pCounter );
90+ #else
91+ return STSE_API_INCOMPATIBLE_DEVICE_TYPE ;
92+ #endif /* STSE_CONF_STSAFE_A_SUPPORT */
8293}
8394
8495stse_ReturnCode_t stse_aes_ccm_encrypt_start (
@@ -95,6 +106,7 @@ stse_ReturnCode_t stse_aes_ccm_encrypt_start(
95106 PLAT_UI8 * pEncrypted_message_chunk ,
96107 PLAT_UI8 * pCounter_presence ,
97108 PLAT_UI32 * pCounter ) {
109+ #ifdef STSE_CONF_STSAFE_A_SUPPORT
98110 if (pSTSE == NULL ) {
99111 return (STSE_API_HANDLER_NOT_INITIALISED );
100112 }
@@ -113,6 +125,9 @@ stse_ReturnCode_t stse_aes_ccm_encrypt_start(
113125 pEncrypted_message_chunk ,
114126 pCounter_presence ,
115127 pCounter );
128+ #else
129+ return STSE_API_INCOMPATIBLE_DEVICE_TYPE ;
130+ #endif /* STSE_CONF_STSAFE_A_SUPPORT */
116131}
117132
118133stse_ReturnCode_t stse_aes_ccm_encrypt_process (
@@ -122,6 +137,7 @@ stse_ReturnCode_t stse_aes_ccm_encrypt_process(
122137 PLAT_UI16 message_chunk_length ,
123138 PLAT_UI8 * pPlaintext_message_chunk ,
124139 PLAT_UI8 * pEncrypted_message_chunk ) {
140+ #ifdef STSE_CONF_STSAFE_A_SUPPORT
125141 if (pSTSE == NULL ) {
126142 return (STSE_API_HANDLER_NOT_INITIALISED );
127143 }
@@ -133,6 +149,9 @@ stse_ReturnCode_t stse_aes_ccm_encrypt_process(
133149 message_chunk_length ,
134150 pPlaintext_message_chunk ,
135151 pEncrypted_message_chunk );
152+ #else
153+ return STSE_API_INCOMPATIBLE_DEVICE_TYPE ;
154+ #endif /* STSE_CONF_STSAFE_A_SUPPORT */
136155}
137156
138157stse_ReturnCode_t stse_aes_ccm_encrypt_finish (
@@ -144,6 +163,7 @@ stse_ReturnCode_t stse_aes_ccm_encrypt_finish(
144163 PLAT_UI8 * pPlaintext_message_chunk ,
145164 PLAT_UI8 * pEncrypted_message_chunk ,
146165 PLAT_UI8 * pEncrypted_authentication_tag ) {
166+ #ifdef STSE_CONF_STSAFE_A_SUPPORT
147167 if (pSTSE == NULL ) {
148168 return (STSE_API_HANDLER_NOT_INITIALISED );
149169 }
@@ -157,6 +177,9 @@ stse_ReturnCode_t stse_aes_ccm_encrypt_finish(
157177 pPlaintext_message_chunk ,
158178 pEncrypted_message_chunk ,
159179 pEncrypted_authentication_tag );
180+ #else
181+ return STSE_API_INCOMPATIBLE_DEVICE_TYPE ;
182+ #endif /* STSE_CONF_STSAFE_A_SUPPORT */
160183}
161184
162185stse_ReturnCode_t stse_aes_ccm_decrypt (
@@ -171,6 +194,7 @@ stse_ReturnCode_t stse_aes_ccm_decrypt(
171194 PLAT_UI8 * pEncrypted_authentication_tag ,
172195 PLAT_UI8 * pVerification_result ,
173196 PLAT_UI8 * pPlaintext_message ) {
197+ #ifdef STSE_CONF_STSAFE_A_SUPPORT
174198 if (pSTSE == NULL ) {
175199 return (STSE_API_HANDLER_NOT_INITIALISED );
176200 }
@@ -187,6 +211,9 @@ stse_ReturnCode_t stse_aes_ccm_decrypt(
187211 pEncrypted_authentication_tag ,
188212 pVerification_result ,
189213 pPlaintext_message );
214+ #else
215+ return STSE_API_INCOMPATIBLE_DEVICE_TYPE ;
216+ #endif /* STSE_CONF_STSAFE_A_SUPPORT */
190217}
191218
192219stse_ReturnCode_t stse_aes_gcm_encrypt (
@@ -201,6 +228,7 @@ stse_ReturnCode_t stse_aes_gcm_encrypt(
201228 PLAT_UI8 * pPlaintext_message ,
202229 PLAT_UI8 * pEncrypted_message ,
203230 PLAT_UI8 * pAuthentication_tag ) {
231+ #ifdef STSE_CONF_STSAFE_A_SUPPORT
204232 if (pSTSE == NULL ) {
205233 return (STSE_API_HANDLER_NOT_INITIALISED );
206234 }
@@ -217,6 +245,9 @@ stse_ReturnCode_t stse_aes_gcm_encrypt(
217245 pPlaintext_message ,
218246 pEncrypted_message ,
219247 pAuthentication_tag );
248+ #else
249+ return STSE_API_INCOMPATIBLE_DEVICE_TYPE ;
250+ #endif /* STSE_CONF_STSAFE_A_SUPPORT */
220251}
221252
222253stse_ReturnCode_t stse_aes_ccm_decrypt_start (
@@ -231,6 +262,7 @@ stse_ReturnCode_t stse_aes_ccm_decrypt_start(
231262 PLAT_UI16 message_chunk_length ,
232263 PLAT_UI8 * pEncrypted_message_chunk ,
233264 PLAT_UI8 * pPlaintext_message_chunk ) {
265+ #ifdef STSE_CONF_STSAFE_A_SUPPORT
234266 if (pSTSE == NULL ) {
235267 return (STSE_API_HANDLER_NOT_INITIALISED );
236268 }
@@ -247,6 +279,9 @@ stse_ReturnCode_t stse_aes_ccm_decrypt_start(
247279 message_chunk_length ,
248280 pEncrypted_message_chunk ,
249281 pPlaintext_message_chunk );
282+ #else
283+ return STSE_API_INCOMPATIBLE_DEVICE_TYPE ;
284+ #endif /* STSE_CONF_STSAFE_A_SUPPORT */
250285}
251286
252287stse_ReturnCode_t stse_aes_ccm_decrypt_process (
@@ -256,6 +291,7 @@ stse_ReturnCode_t stse_aes_ccm_decrypt_process(
256291 PLAT_UI16 message_chunk_length ,
257292 PLAT_UI8 * pEncrypted_message_chunk ,
258293 PLAT_UI8 * pPlaintext_message_chunk ) {
294+ #ifdef STSE_CONF_STSAFE_A_SUPPORT
259295 if (pSTSE == NULL ) {
260296 return (STSE_API_HANDLER_NOT_INITIALISED );
261297 }
@@ -267,6 +303,9 @@ stse_ReturnCode_t stse_aes_ccm_decrypt_process(
267303 message_chunk_length ,
268304 pEncrypted_message_chunk ,
269305 pPlaintext_message_chunk );
306+ #else
307+ return STSE_API_INCOMPATIBLE_DEVICE_TYPE ;
308+ #endif /* STSE_CONF_STSAFE_A_SUPPORT */
270309}
271310
272311stse_ReturnCode_t stse_aes_ccm_decrypt_finish (
@@ -279,6 +318,7 @@ stse_ReturnCode_t stse_aes_ccm_decrypt_finish(
279318 PLAT_UI8 * pAuthentication_tag ,
280319 PLAT_UI8 * pVerification_result ,
281320 PLAT_UI8 * pPlaintext_message_chunk ) {
321+ #ifdef STSE_CONF_STSAFE_A_SUPPORT
282322 if (pSTSE == NULL ) {
283323 return (STSE_API_HANDLER_NOT_INITIALISED );
284324 }
@@ -293,6 +333,9 @@ stse_ReturnCode_t stse_aes_ccm_decrypt_finish(
293333 pAuthentication_tag ,
294334 pVerification_result ,
295335 pPlaintext_message_chunk );
336+ #else
337+ return STSE_API_INCOMPATIBLE_DEVICE_TYPE ;
338+ #endif /* STSE_CONF_STSAFE_A_SUPPORT */
296339}
297340
298341stse_ReturnCode_t stse_aes_gcm_encrypt_start (
@@ -305,6 +348,7 @@ stse_ReturnCode_t stse_aes_gcm_encrypt_start(
305348 PLAT_UI16 message_chunk_length ,
306349 PLAT_UI8 * pPlaintext_message_chunk ,
307350 PLAT_UI8 * pEncrypted_message_chunk ) {
351+ #ifdef STSE_CONF_STSAFE_A_SUPPORT
308352 if (pSTSE == NULL ) {
309353 return (STSE_API_HANDLER_NOT_INITIALISED );
310354 }
@@ -319,6 +363,9 @@ stse_ReturnCode_t stse_aes_gcm_encrypt_start(
319363 message_chunk_length ,
320364 pPlaintext_message_chunk ,
321365 pEncrypted_message_chunk );
366+ #else
367+ return STSE_API_INCOMPATIBLE_DEVICE_TYPE ;
368+ #endif /* STSE_CONF_STSAFE_A_SUPPORT */
322369}
323370
324371stse_ReturnCode_t stse_aes_gcm_encrypt_process (
@@ -328,6 +375,7 @@ stse_ReturnCode_t stse_aes_gcm_encrypt_process(
328375 PLAT_UI16 message_chunk_length ,
329376 PLAT_UI8 * pPlaintext_message_chunk ,
330377 PLAT_UI8 * pEncrypted_message_chunk ) {
378+ #ifdef STSE_CONF_STSAFE_A_SUPPORT
331379 if (pSTSE == NULL ) {
332380 return (STSE_API_HANDLER_NOT_INITIALISED );
333381 }
@@ -339,6 +387,9 @@ stse_ReturnCode_t stse_aes_gcm_encrypt_process(
339387 message_chunk_length ,
340388 pPlaintext_message_chunk ,
341389 pEncrypted_message_chunk );
390+ #else
391+ return STSE_API_INCOMPATIBLE_DEVICE_TYPE ;
392+ #endif /* STSE_CONF_STSAFE_A_SUPPORT */
342393}
343394
344395stse_ReturnCode_t stse_aes_gcm_encrypt_finish (
@@ -350,6 +401,7 @@ stse_ReturnCode_t stse_aes_gcm_encrypt_finish(
350401 PLAT_UI8 * pPlaintext_message_chunk ,
351402 PLAT_UI8 * pEncrypted_message_chunk ,
352403 PLAT_UI8 * pAuthentication_tag ) {
404+ #ifdef STSE_CONF_STSAFE_A_SUPPORT
353405 if (pSTSE == NULL ) {
354406 return (STSE_API_HANDLER_NOT_INITIALISED );
355407 }
@@ -363,6 +415,9 @@ stse_ReturnCode_t stse_aes_gcm_encrypt_finish(
363415 pPlaintext_message_chunk ,
364416 pEncrypted_message_chunk ,
365417 pAuthentication_tag );
418+ #else
419+ return STSE_API_INCOMPATIBLE_DEVICE_TYPE ;
420+ #endif /* STSE_CONF_STSAFE_A_SUPPORT */
366421}
367422
368423stse_ReturnCode_t stse_aes_gcm_decrypt (
@@ -378,6 +433,7 @@ stse_ReturnCode_t stse_aes_gcm_decrypt(
378433 PLAT_UI8 * pAuthentication_tag ,
379434 PLAT_UI8 * pVerification_result ,
380435 PLAT_UI8 * pPlaintext_message ) {
436+ #ifdef STSE_CONF_STSAFE_A_SUPPORT
381437 if (pSTSE == NULL ) {
382438 return (STSE_API_HANDLER_NOT_INITIALISED );
383439 }
@@ -395,6 +451,9 @@ stse_ReturnCode_t stse_aes_gcm_decrypt(
395451 pAuthentication_tag ,
396452 pVerification_result ,
397453 pPlaintext_message );
454+ #else
455+ return STSE_API_INCOMPATIBLE_DEVICE_TYPE ;
456+ #endif /* STSE_CONF_STSAFE_A_SUPPORT */
398457}
399458
400459stse_ReturnCode_t stse_aes_gcm_decrypt_start (
@@ -407,6 +466,7 @@ stse_ReturnCode_t stse_aes_gcm_decrypt_start(
407466 PLAT_UI16 message_chunk_length ,
408467 PLAT_UI8 * pEncrypted_message_chunk ,
409468 PLAT_UI8 * pPlaintext_message_chunk ) {
469+ #ifdef STSE_CONF_STSAFE_A_SUPPORT
410470 if (pSTSE == NULL ) {
411471 return (STSE_API_HANDLER_NOT_INITIALISED );
412472 }
@@ -421,6 +481,9 @@ stse_ReturnCode_t stse_aes_gcm_decrypt_start(
421481 message_chunk_length ,
422482 pEncrypted_message_chunk ,
423483 pPlaintext_message_chunk );
484+ #else
485+ return STSE_API_INCOMPATIBLE_DEVICE_TYPE ;
486+ #endif /* STSE_CONF_STSAFE_A_SUPPORT */
424487}
425488
426489stse_ReturnCode_t stse_aes_gcm_decrypt_process (
@@ -430,6 +493,7 @@ stse_ReturnCode_t stse_aes_gcm_decrypt_process(
430493 PLAT_UI16 message_chunk_length ,
431494 PLAT_UI8 * pEncrypted_message_chunk ,
432495 PLAT_UI8 * pPlaintext_message_chunk ) {
496+ #ifdef STSE_CONF_STSAFE_A_SUPPORT
433497 if (pSTSE == NULL ) {
434498 return (STSE_API_HANDLER_NOT_INITIALISED );
435499 }
@@ -441,6 +505,9 @@ stse_ReturnCode_t stse_aes_gcm_decrypt_process(
441505 message_chunk_length ,
442506 pEncrypted_message_chunk ,
443507 pPlaintext_message_chunk );
508+ #else
509+ return STSE_API_INCOMPATIBLE_DEVICE_TYPE ;
510+ #endif /* STSE_CONF_STSAFE_A_SUPPORT */
444511}
445512
446513stse_ReturnCode_t stse_aes_gcm_decrypt_finish (
@@ -453,6 +520,7 @@ stse_ReturnCode_t stse_aes_gcm_decrypt_finish(
453520 PLAT_UI8 * pAuthentication_tag ,
454521 PLAT_UI8 * pVerification_result ,
455522 PLAT_UI8 * pPlaintext_message_chunk ) {
523+ #ifdef STSE_CONF_STSAFE_A_SUPPORT
456524 if (pSTSE == NULL ) {
457525 return (STSE_API_HANDLER_NOT_INITIALISED );
458526 }
@@ -467,4 +535,7 @@ stse_ReturnCode_t stse_aes_gcm_decrypt_finish(
467535 pAuthentication_tag ,
468536 pVerification_result ,
469537 pPlaintext_message_chunk );
538+ #else
539+ return STSE_API_INCOMPATIBLE_DEVICE_TYPE ;
540+ #endif /* STSE_CONF_STSAFE_A_SUPPORT */
470541}
0 commit comments