Lines Matching refs:ctx

153 	sha1_context ctx;  in spl_hash_android()  local
162 sha1_starts(&ctx); in spl_hash_android()
165 sha1_update(&ctx, (const uchar *)buf, hdr->kernel_size); in spl_hash_android()
166 sha1_update(&ctx, (const uchar *)&hdr->kernel_size, sizeof(hdr->kernel_size)); in spl_hash_android()
169 sha1_update(&ctx, (const uchar *)buf, hdr->ramdisk_size); in spl_hash_android()
170 sha1_update(&ctx, (const uchar *)&hdr->ramdisk_size, sizeof(hdr->ramdisk_size)); in spl_hash_android()
173 sha1_update(&ctx, (const uchar *)buf, hdr->second_size); in spl_hash_android()
174 sha1_update(&ctx, (const uchar *)&hdr->second_size, sizeof(hdr->second_size)); in spl_hash_android()
178 sha1_update(&ctx, (const uchar *)buf, hdr->recovery_dtbo_size); in spl_hash_android()
179 sha1_update(&ctx, (const uchar *)&hdr->recovery_dtbo_size, sizeof(hdr->recovery_dtbo_size)); in spl_hash_android()
183 sha1_update(&ctx, (const uchar *)buf, hdr->dtb_size); in spl_hash_android()
184 sha1_update(&ctx, (const uchar *)&hdr->dtb_size, sizeof(hdr->dtb_size)); in spl_hash_android()
187 sha1_finish(&ctx, hash); in spl_hash_android()
205 sha_context ctx; in spl_hash_android() local
214 ctx.algo = CRYPTO_SHA1; in spl_hash_android()
215 dev = crypto_get_device(ctx.algo); in spl_hash_android()
221 ctx.length = hdr->kernel_size + sizeof(hdr->kernel_size) + in spl_hash_android()
225 ctx.length += hdr->recovery_dtbo_size + sizeof(hdr->recovery_dtbo_size); in spl_hash_android()
227 ctx.length += hdr->dtb_size + sizeof(hdr->dtb_size); in spl_hash_android()
229 crypto_sha_init(dev, &ctx); in spl_hash_android()
254 crypto_sha_final(dev, &ctx, hash); in spl_hash_android()