Lines Matching refs:algo
277 char *algo; in fit_image_print_data() local
284 if (fit_image_hash_get_algo(fit, noffset, &algo)) { in fit_image_print_data()
288 printf("%s", algo); in fit_image_print_data()
1068 int fit_image_hash_get_algo(const void *fit, int noffset, char **algo) in fit_image_hash_get_algo() argument
1072 *algo = (char *)fdt_getprop(fit, noffset, FIT_ALGO_PROP, &len); in fit_image_hash_get_algo()
1073 if (*algo == NULL) { in fit_image_hash_get_algo()
1154 int fit_image_cipher_get_algo(const void *fit, int noffset, char **algo) in fit_image_cipher_get_algo() argument
1158 *algo = (char *)fdt_getprop(fit, noffset, FIT_ALGO_PROP, &len); in fit_image_cipher_get_algo()
1159 if (!*algo) { in fit_image_cipher_get_algo()
1231 const char *algo, uint8_t *value, in fit_calculate_hash() argument
1234 if (IMAGE_ENABLE_CRC32 && strcmp(algo, "crc32") == 0) { in fit_calculate_hash()
1240 } else if (IMAGE_ENABLE_SHA1 && strcmp(algo, "sha1") == 0) { in fit_calculate_hash()
1246 } else if (IMAGE_ENABLE_SHA256 && strcmp(algo, "sha256") == 0) { in fit_calculate_hash()
1252 } else if (IMAGE_ENABLE_MD5 && strcmp(algo, "md5") == 0) { in fit_calculate_hash()
1276 csha_ctx.algo = cap; in crypto_csum()
1283 const char *algo, uint8_t *value, in hw_fit_calculate_hash() argument
1288 if (IMAGE_ENABLE_CRC32 && strcmp(algo, "crc32") == 0) { in hw_fit_calculate_hash()
1293 } else if (IMAGE_ENABLE_SHA1 && strcmp(algo, "sha1") == 0) { in hw_fit_calculate_hash()
1296 } else if (IMAGE_ENABLE_SHA256 && strcmp(algo, "sha256") == 0) { in hw_fit_calculate_hash()
1299 } else if (IMAGE_ENABLE_MD5 && strcmp(algo, "md5") == 0) { in hw_fit_calculate_hash()
1308 printf("%s: algo %s failed, ret=%d\n", __func__, algo, ret); in hw_fit_calculate_hash()
1333 int calculate_hash(const void *data, int data_len, const char *algo, in calculate_hash() argument
1337 return fit_calculate_hash(data, data_len, algo, value, value_len); in calculate_hash()
1340 return fit_calculate_hash(data, data_len, algo, value, value_len); in calculate_hash()
1342 return hw_fit_calculate_hash(data, data_len, algo, value, value_len); in calculate_hash()
1352 char *algo; in fit_image_check_hash() local
1360 if (fit_image_hash_get_algo(fit, noffset, &algo)) { in fit_image_check_hash()
1364 printf("%s", algo); in fit_image_check_hash()
1380 if (calculate_hash(data, size, algo, value, &value_len)) { in fit_image_check_hash()
1619 config.algo = RK_ALGO_AES; in fit_image_uncipher()