Lines Matching refs:operation

22     mbedtls_psa_hash_operation_t *operation)
24 switch (operation->alg) {
32 mbedtls_md5_free(&operation->ctx.md5);
37 mbedtls_ripemd160_free(&operation->ctx.ripemd160);
42 mbedtls_sha1_free(&operation->ctx.sha1);
47 mbedtls_sha256_free(&operation->ctx.sha256);
52 mbedtls_sha256_free(&operation->ctx.sha256);
57 mbedtls_sha512_free(&operation->ctx.sha512);
62 mbedtls_sha512_free(&operation->ctx.sha512);
81 mbedtls_sha3_free(&operation->ctx.sha3);
87 operation->alg = 0;
92 mbedtls_psa_hash_operation_t *operation,
98 if (operation->alg != 0) {
105 mbedtls_md5_init(&operation->ctx.md5);
106 ret = mbedtls_md5_starts(&operation->ctx.md5);
111 mbedtls_ripemd160_init(&operation->ctx.ripemd160);
112 ret = mbedtls_ripemd160_starts(&operation->ctx.ripemd160);
117 mbedtls_sha1_init(&operation->ctx.sha1);
118 ret = mbedtls_sha1_starts(&operation->ctx.sha1);
123 mbedtls_sha256_init(&operation->ctx.sha256);
124 ret = mbedtls_sha256_starts(&operation->ctx.sha256, 1);
129 mbedtls_sha256_init(&operation->ctx.sha256);
130 ret = mbedtls_sha256_starts(&operation->ctx.sha256, 0);
135 mbedtls_sha512_init(&operation->ctx.sha512);
136 ret = mbedtls_sha512_starts(&operation->ctx.sha512, 1);
141 mbedtls_sha512_init(&operation->ctx.sha512);
142 ret = mbedtls_sha512_starts(&operation->ctx.sha512, 0);
147 mbedtls_sha3_init(&operation->ctx.sha3);
148 ret = mbedtls_sha3_starts(&operation->ctx.sha3, MBEDTLS_SHA3_224);
153 mbedtls_sha3_init(&operation->ctx.sha3);
154 ret = mbedtls_sha3_starts(&operation->ctx.sha3, MBEDTLS_SHA3_256);
159 mbedtls_sha3_init(&operation->ctx.sha3);
160 ret = mbedtls_sha3_starts(&operation->ctx.sha3, MBEDTLS_SHA3_384);
165 mbedtls_sha3_init(&operation->ctx.sha3);
166 ret = mbedtls_sha3_starts(&operation->ctx.sha3, MBEDTLS_SHA3_512);
175 operation->alg = alg;
177 mbedtls_psa_hash_abort(operation);
262 mbedtls_psa_hash_operation_t *operation,
268 switch (operation->alg) {
271 ret = mbedtls_md5_update(&operation->ctx.md5,
277 ret = mbedtls_ripemd160_update(&operation->ctx.ripemd160,
283 ret = mbedtls_sha1_update(&operation->ctx.sha1,
289 ret = mbedtls_sha256_update(&operation->ctx.sha256,
295 ret = mbedtls_sha256_update(&operation->ctx.sha256,
301 ret = mbedtls_sha512_update(&operation->ctx.sha512,
307 ret = mbedtls_sha512_update(&operation->ctx.sha512,
327 ret = mbedtls_sha3_update(&operation->ctx.sha3,
341 mbedtls_psa_hash_operation_t *operation,
348 size_t actual_hash_length = PSA_HASH_LENGTH(operation->alg);
365 switch (operation->alg) {
368 ret = mbedtls_md5_finish(&operation->ctx.md5, hash);
373 ret = mbedtls_ripemd160_finish(&operation->ctx.ripemd160, hash);
378 ret = mbedtls_sha1_finish(&operation->ctx.sha1, hash);
383 ret = mbedtls_sha256_finish(&operation->ctx.sha256, hash);
388 ret = mbedtls_sha256_finish(&operation->ctx.sha256, hash);
393 ret = mbedtls_sha512_finish(&operation->ctx.sha512, hash);
398 ret = mbedtls_sha512_finish(&operation->ctx.sha512, hash);
417 ret = mbedtls_sha3_finish(&operation->ctx.sha3, hash, hash_size);
441 mbedtls_psa_hash_operation_t operation = MBEDTLS_PSA_HASH_OPERATION_INIT;
446 status = mbedtls_psa_hash_setup(&operation, alg);
450 status = mbedtls_psa_hash_update(&operation, input, input_length);
454 status = mbedtls_psa_hash_finish(&operation, hash, hash_size, hash_length);
460 abort_status = mbedtls_psa_hash_abort(&operation);