Lines Matching refs:dc
83 int vb2_digest_init(struct vb2_digest_context *dc, in vb2_digest_init() argument
86 dc->hash_alg = hash_alg; in vb2_digest_init()
87 dc->using_hwcrypto = 0; in vb2_digest_init()
89 switch (dc->hash_alg) { in vb2_digest_init()
92 vb2_sha1_init(&dc->sha1); in vb2_digest_init()
97 vb2_sha256_init(&dc->sha256); in vb2_digest_init()
102 vb2_sha512_init(&dc->sha512); in vb2_digest_init()
110 int vb2_digest_extend(struct vb2_digest_context *dc, in vb2_digest_extend() argument
114 switch (dc->hash_alg) { in vb2_digest_extend()
117 vb2_sha1_update(&dc->sha1, buf, size); in vb2_digest_extend()
122 vb2_sha256_update(&dc->sha256, buf, size); in vb2_digest_extend()
127 vb2_sha512_update(&dc->sha512, buf, size); in vb2_digest_extend()
135 int vb2_digest_finalize(struct vb2_digest_context *dc, in vb2_digest_finalize() argument
139 if (digest_size < vb2_digest_size(dc->hash_alg)) in vb2_digest_finalize()
142 switch (dc->hash_alg) { in vb2_digest_finalize()
145 vb2_sha1_finalize(&dc->sha1, digest); in vb2_digest_finalize()
150 vb2_sha256_finalize(&dc->sha256, digest); in vb2_digest_finalize()
155 vb2_sha512_finalize(&dc->sha512, digest); in vb2_digest_finalize()