Lines Matching refs:fec_size
197 ctx->fec_size = ctx->rounds * ctx->roots * FEC_BLOCKSIZE; in image_ecc_new()
200 INFO("allocating %u bytes of memory\n", ctx->fec_size); in image_ecc_new()
203 ctx->fec = new uint8_t[ctx->fec_size]; in image_ecc_new()
206 FATAL("failed to allocate %u bytes\n", ctx->fec_size); in image_ecc_new()
254 if (p->fec_size % p->roots || p->fec_size % FEC_BLOCKSIZE) { in image_ecc_load()
255 FATAL("invalid length in '%s': %u\n", filename.c_str(), p->fec_size); in image_ecc_load()
267 if (p->fec_size != ctx->fec_size) { in image_ecc_load()
275 if (!android::base::ReadFully(fd, ctx->fec, ctx->fec_size)) { in image_ecc_load()
276 FATAL("failed to read %u bytes from '%s': %s\n", ctx->fec_size, in image_ecc_load()
283 SHA256(ctx->fec, ctx->fec_size, hash); in image_ecc_load()
304 f->fec_size = ctx->fec_size; in image_ecc_save()
307 SHA256(ctx->fec, ctx->fec_size, f->hash); in image_ecc_save()
323 if (!android::base::WriteFully(fd, ctx->fec, ctx->fec_size)) { in image_ecc_save()