Lines Matching full:desc

76 #define SHA224_CTX(desc) ((struct sha224_ctx *)shash_desc_ctx(desc))  argument
78 static int crypto_sha224_init(struct shash_desc *desc) in crypto_sha224_init() argument
80 sha224_init(SHA224_CTX(desc)); in crypto_sha224_init()
84 static int crypto_sha224_update(struct shash_desc *desc, in crypto_sha224_update() argument
87 sha224_update(SHA224_CTX(desc), data, len); in crypto_sha224_update()
91 static int crypto_sha224_final(struct shash_desc *desc, u8 *out) in crypto_sha224_final() argument
93 sha224_final(SHA224_CTX(desc), out); in crypto_sha224_final()
97 static int crypto_sha224_digest(struct shash_desc *desc, in crypto_sha224_digest() argument
104 static int crypto_sha224_export(struct shash_desc *desc, void *out) in crypto_sha224_export() argument
106 return __crypto_sha256_export(&SHA224_CTX(desc)->ctx, out); in crypto_sha224_export()
109 static int crypto_sha224_import(struct shash_desc *desc, const void *in) in crypto_sha224_import() argument
111 return __crypto_sha256_import(&SHA224_CTX(desc)->ctx, in); in crypto_sha224_import()
114 static int crypto_sha224_export_core(struct shash_desc *desc, void *out) in crypto_sha224_export_core() argument
116 return __crypto_sha256_export_core(&SHA224_CTX(desc)->ctx, out); in crypto_sha224_export_core()
119 static int crypto_sha224_import_core(struct shash_desc *desc, const void *in) in crypto_sha224_import_core() argument
121 return __crypto_sha256_import_core(&SHA224_CTX(desc)->ctx, in); in crypto_sha224_import_core()
134 #define SHA256_CTX(desc) ((struct sha256_ctx *)shash_desc_ctx(desc)) argument
136 static int crypto_sha256_init(struct shash_desc *desc) in crypto_sha256_init() argument
138 sha256_init(SHA256_CTX(desc)); in crypto_sha256_init()
142 static int crypto_sha256_update(struct shash_desc *desc, in crypto_sha256_update() argument
145 sha256_update(SHA256_CTX(desc), data, len); in crypto_sha256_update()
149 static int crypto_sha256_final(struct shash_desc *desc, u8 *out) in crypto_sha256_final() argument
151 sha256_final(SHA256_CTX(desc), out); in crypto_sha256_final()
155 static int crypto_sha256_digest(struct shash_desc *desc, in crypto_sha256_digest() argument
162 static int crypto_sha256_export(struct shash_desc *desc, void *out) in crypto_sha256_export() argument
164 return __crypto_sha256_export(&SHA256_CTX(desc)->ctx, out); in crypto_sha256_export()
167 static int crypto_sha256_import(struct shash_desc *desc, const void *in) in crypto_sha256_import() argument
169 return __crypto_sha256_import(&SHA256_CTX(desc)->ctx, in); in crypto_sha256_import()
172 static int crypto_sha256_export_core(struct shash_desc *desc, void *out) in crypto_sha256_export_core() argument
174 return __crypto_sha256_export_core(&SHA256_CTX(desc)->ctx, out); in crypto_sha256_export_core()
177 static int crypto_sha256_import_core(struct shash_desc *desc, const void *in) in crypto_sha256_import_core() argument
179 return __crypto_sha256_import_core(&SHA256_CTX(desc)->ctx, in); in crypto_sha256_import_core()
185 #define HMAC_SHA224_CTX(desc) ((struct hmac_sha224_ctx *)shash_desc_ctx(desc)) argument
194 static int crypto_hmac_sha224_init(struct shash_desc *desc) in crypto_hmac_sha224_init() argument
196 hmac_sha224_init(HMAC_SHA224_CTX(desc), HMAC_SHA224_KEY(desc->tfm)); in crypto_hmac_sha224_init()
200 static int crypto_hmac_sha224_update(struct shash_desc *desc, in crypto_hmac_sha224_update() argument
203 hmac_sha224_update(HMAC_SHA224_CTX(desc), data, len); in crypto_hmac_sha224_update()
207 static int crypto_hmac_sha224_final(struct shash_desc *desc, u8 *out) in crypto_hmac_sha224_final() argument
209 hmac_sha224_final(HMAC_SHA224_CTX(desc), out); in crypto_hmac_sha224_final()
213 static int crypto_hmac_sha224_digest(struct shash_desc *desc, in crypto_hmac_sha224_digest() argument
217 hmac_sha224(HMAC_SHA224_KEY(desc->tfm), data, len, out); in crypto_hmac_sha224_digest()
221 static int crypto_hmac_sha224_export(struct shash_desc *desc, void *out) in crypto_hmac_sha224_export() argument
223 return __crypto_sha256_export(&HMAC_SHA224_CTX(desc)->ctx.sha_ctx, out); in crypto_hmac_sha224_export()
226 static int crypto_hmac_sha224_import(struct shash_desc *desc, const void *in) in crypto_hmac_sha224_import() argument
228 struct hmac_sha224_ctx *ctx = HMAC_SHA224_CTX(desc); in crypto_hmac_sha224_import()
230 ctx->ctx.ostate = HMAC_SHA224_KEY(desc->tfm)->key.ostate; in crypto_hmac_sha224_import()
234 static int crypto_hmac_sha224_export_core(struct shash_desc *desc, void *out) in crypto_hmac_sha224_export_core() argument
236 return __crypto_sha256_export_core(&HMAC_SHA224_CTX(desc)->ctx.sha_ctx, in crypto_hmac_sha224_export_core()
240 static int crypto_hmac_sha224_import_core(struct shash_desc *desc, in crypto_hmac_sha224_import_core() argument
243 struct hmac_sha224_ctx *ctx = HMAC_SHA224_CTX(desc); in crypto_hmac_sha224_import_core()
245 ctx->ctx.ostate = HMAC_SHA224_KEY(desc->tfm)->key.ostate; in crypto_hmac_sha224_import_core()
252 #define HMAC_SHA256_CTX(desc) ((struct hmac_sha256_ctx *)shash_desc_ctx(desc)) argument
261 static int crypto_hmac_sha256_init(struct shash_desc *desc) in crypto_hmac_sha256_init() argument
263 hmac_sha256_init(HMAC_SHA256_CTX(desc), HMAC_SHA256_KEY(desc->tfm)); in crypto_hmac_sha256_init()
267 static int crypto_hmac_sha256_update(struct shash_desc *desc, in crypto_hmac_sha256_update() argument
270 hmac_sha256_update(HMAC_SHA256_CTX(desc), data, len); in crypto_hmac_sha256_update()
274 static int crypto_hmac_sha256_final(struct shash_desc *desc, u8 *out) in crypto_hmac_sha256_final() argument
276 hmac_sha256_final(HMAC_SHA256_CTX(desc), out); in crypto_hmac_sha256_final()
280 static int crypto_hmac_sha256_digest(struct shash_desc *desc, in crypto_hmac_sha256_digest() argument
284 hmac_sha256(HMAC_SHA256_KEY(desc->tfm), data, len, out); in crypto_hmac_sha256_digest()
288 static int crypto_hmac_sha256_export(struct shash_desc *desc, void *out) in crypto_hmac_sha256_export() argument
290 return __crypto_sha256_export(&HMAC_SHA256_CTX(desc)->ctx.sha_ctx, out); in crypto_hmac_sha256_export()
293 static int crypto_hmac_sha256_import(struct shash_desc *desc, const void *in) in crypto_hmac_sha256_import() argument
295 struct hmac_sha256_ctx *ctx = HMAC_SHA256_CTX(desc); in crypto_hmac_sha256_import()
297 ctx->ctx.ostate = HMAC_SHA256_KEY(desc->tfm)->key.ostate; in crypto_hmac_sha256_import()
301 static int crypto_hmac_sha256_export_core(struct shash_desc *desc, void *out) in crypto_hmac_sha256_export_core() argument
303 return __crypto_sha256_export_core(&HMAC_SHA256_CTX(desc)->ctx.sha_ctx, in crypto_hmac_sha256_export_core()
307 static int crypto_hmac_sha256_import_core(struct shash_desc *desc, in crypto_hmac_sha256_import_core() argument
310 struct hmac_sha256_ctx *ctx = HMAC_SHA256_CTX(desc); in crypto_hmac_sha256_import_core()
312 ctx->ctx.ostate = HMAC_SHA256_KEY(desc->tfm)->key.ostate; in crypto_hmac_sha256_import_core()