Lines Matching refs:status
57 psa_status_t status; in cipher_operation() local
66 status = psa_cipher_update(operation, input + bytes_written, in cipher_operation()
69 ASSERT_STATUS(status, PSA_SUCCESS); in cipher_operation()
75 status = psa_cipher_finish(operation, output + *output_len, in cipher_operation()
77 ASSERT_STATUS(status, PSA_SUCCESS); in cipher_operation()
81 return status; in cipher_operation()
95 psa_status_t status; in cipher_encrypt() local
100 status = psa_cipher_encrypt_setup(&operation, key, alg); in cipher_encrypt()
101 ASSERT_STATUS(status, PSA_SUCCESS); in cipher_encrypt()
103 status = psa_cipher_generate_iv(&operation, iv, iv_size, &iv_len); in cipher_encrypt()
104 ASSERT_STATUS(status, PSA_SUCCESS); in cipher_encrypt()
106 status = cipher_operation(&operation, input, input_size, part_size, in cipher_encrypt()
108 ASSERT_STATUS(status, PSA_SUCCESS); in cipher_encrypt()
112 return status; in cipher_encrypt()
126 psa_status_t status; in cipher_decrypt() local
130 status = psa_cipher_decrypt_setup(&operation, key, alg); in cipher_decrypt()
131 ASSERT_STATUS(status, PSA_SUCCESS); in cipher_decrypt()
133 status = psa_cipher_set_iv(&operation, iv, iv_size); in cipher_decrypt()
134 ASSERT_STATUS(status, PSA_SUCCESS); in cipher_decrypt()
136 status = cipher_operation(&operation, input, input_size, part_size, in cipher_decrypt()
138 ASSERT_STATUS(status, PSA_SUCCESS); in cipher_decrypt()
142 return status; in cipher_decrypt()
155 psa_status_t status; in cipher_example_encrypt_decrypt_aes_cbc_nopad_1_block() local
164 status = psa_generate_random(input, sizeof(input)); in cipher_example_encrypt_decrypt_aes_cbc_nopad_1_block()
165 ASSERT_STATUS(status, PSA_SUCCESS); in cipher_example_encrypt_decrypt_aes_cbc_nopad_1_block()
173 status = psa_generate_key(&attributes, &key); in cipher_example_encrypt_decrypt_aes_cbc_nopad_1_block()
174 ASSERT_STATUS(status, PSA_SUCCESS); in cipher_example_encrypt_decrypt_aes_cbc_nopad_1_block()
176 status = cipher_encrypt(key, alg, iv, sizeof(iv), in cipher_example_encrypt_decrypt_aes_cbc_nopad_1_block()
179 ASSERT_STATUS(status, PSA_SUCCESS); in cipher_example_encrypt_decrypt_aes_cbc_nopad_1_block()
181 status = cipher_decrypt(key, alg, iv, sizeof(iv), in cipher_example_encrypt_decrypt_aes_cbc_nopad_1_block()
184 ASSERT_STATUS(status, PSA_SUCCESS); in cipher_example_encrypt_decrypt_aes_cbc_nopad_1_block()
186 status = memcmp(input, decrypt, sizeof(input)); in cipher_example_encrypt_decrypt_aes_cbc_nopad_1_block()
187 ASSERT_STATUS(status, PSA_SUCCESS); in cipher_example_encrypt_decrypt_aes_cbc_nopad_1_block()
191 return status; in cipher_example_encrypt_decrypt_aes_cbc_nopad_1_block()
205 psa_status_t status; in cipher_example_encrypt_decrypt_aes_cbc_pkcs7_multi() local
212 status = psa_generate_random(input, sizeof(input)); in cipher_example_encrypt_decrypt_aes_cbc_pkcs7_multi()
213 ASSERT_STATUS(status, PSA_SUCCESS); in cipher_example_encrypt_decrypt_aes_cbc_pkcs7_multi()
221 status = psa_generate_key(&attributes, &key); in cipher_example_encrypt_decrypt_aes_cbc_pkcs7_multi()
222 ASSERT_STATUS(status, PSA_SUCCESS); in cipher_example_encrypt_decrypt_aes_cbc_pkcs7_multi()
224 status = cipher_encrypt(key, alg, iv, sizeof(iv), in cipher_example_encrypt_decrypt_aes_cbc_pkcs7_multi()
227 ASSERT_STATUS(status, PSA_SUCCESS); in cipher_example_encrypt_decrypt_aes_cbc_pkcs7_multi()
229 status = cipher_decrypt(key, alg, iv, sizeof(iv), in cipher_example_encrypt_decrypt_aes_cbc_pkcs7_multi()
232 ASSERT_STATUS(status, PSA_SUCCESS); in cipher_example_encrypt_decrypt_aes_cbc_pkcs7_multi()
234 status = memcmp(input, decrypt, sizeof(input)); in cipher_example_encrypt_decrypt_aes_cbc_pkcs7_multi()
235 ASSERT_STATUS(status, PSA_SUCCESS); in cipher_example_encrypt_decrypt_aes_cbc_pkcs7_multi()
239 return status; in cipher_example_encrypt_decrypt_aes_cbc_pkcs7_multi()
252 psa_status_t status; in cipher_example_encrypt_decrypt_aes_ctr_multi() local
259 status = psa_generate_random(input, sizeof(input)); in cipher_example_encrypt_decrypt_aes_ctr_multi()
260 ASSERT_STATUS(status, PSA_SUCCESS); in cipher_example_encrypt_decrypt_aes_ctr_multi()
268 status = psa_generate_key(&attributes, &key); in cipher_example_encrypt_decrypt_aes_ctr_multi()
269 ASSERT_STATUS(status, PSA_SUCCESS); in cipher_example_encrypt_decrypt_aes_ctr_multi()
271 status = cipher_encrypt(key, alg, iv, sizeof(iv), in cipher_example_encrypt_decrypt_aes_ctr_multi()
274 ASSERT_STATUS(status, PSA_SUCCESS); in cipher_example_encrypt_decrypt_aes_ctr_multi()
276 status = cipher_decrypt(key, alg, iv, sizeof(iv), in cipher_example_encrypt_decrypt_aes_ctr_multi()
279 ASSERT_STATUS(status, PSA_SUCCESS); in cipher_example_encrypt_decrypt_aes_ctr_multi()
281 status = memcmp(input, decrypt, sizeof(input)); in cipher_example_encrypt_decrypt_aes_ctr_multi()
282 ASSERT_STATUS(status, PSA_SUCCESS); in cipher_example_encrypt_decrypt_aes_ctr_multi()
286 return status; in cipher_example_encrypt_decrypt_aes_ctr_multi()
291 psa_status_t status; in cipher_examples() local
294 status = cipher_example_encrypt_decrypt_aes_cbc_nopad_1_block(); in cipher_examples()
295 if (status == PSA_SUCCESS) { in cipher_examples()
300 status = cipher_example_encrypt_decrypt_aes_cbc_pkcs7_multi(); in cipher_examples()
301 if (status == PSA_SUCCESS) { in cipher_examples()
306 status = cipher_example_encrypt_decrypt_aes_ctr_multi(); in cipher_examples()
307 if (status == PSA_SUCCESS) { in cipher_examples()