Lines Matching refs:desc
32 static int padlock_sha_init(struct shash_desc *desc) in padlock_sha_init() argument
34 struct padlock_sha_desc *dctx = shash_desc_ctx(desc); in padlock_sha_init()
35 struct padlock_sha_ctx *ctx = crypto_shash_ctx(desc->tfm); in padlock_sha_init()
41 static int padlock_sha_update(struct shash_desc *desc, in padlock_sha_update() argument
44 struct padlock_sha_desc *dctx = shash_desc_ctx(desc); in padlock_sha_update()
49 static int padlock_sha_export(struct shash_desc *desc, void *out) in padlock_sha_export() argument
51 struct padlock_sha_desc *dctx = shash_desc_ctx(desc); in padlock_sha_export()
56 static int padlock_sha_import(struct shash_desc *desc, const void *in) in padlock_sha_import() argument
58 struct padlock_sha_desc *dctx = shash_desc_ctx(desc); in padlock_sha_import()
59 struct padlock_sha_ctx *ctx = crypto_shash_ctx(desc->tfm); in padlock_sha_import()
72 static int padlock_sha1_finup(struct shash_desc *desc, const u8 *in, in padlock_sha1_finup() argument
81 struct padlock_sha_desc *dctx = shash_desc_ctx(desc); in padlock_sha1_finup()
126 static int padlock_sha1_final(struct shash_desc *desc, u8 *out) in padlock_sha1_final() argument
130 return padlock_sha1_finup(desc, buf, 0, out); in padlock_sha1_final()
133 static int padlock_sha256_finup(struct shash_desc *desc, const u8 *in, in padlock_sha256_finup() argument
142 struct padlock_sha_desc *dctx = shash_desc_ctx(desc); in padlock_sha256_finup()
187 static int padlock_sha256_final(struct shash_desc *desc, u8 *out) in padlock_sha256_final() argument
191 return padlock_sha256_finup(desc, buf, 0, out); in padlock_sha256_final()
269 static int padlock_sha1_init_nano(struct shash_desc *desc) in padlock_sha1_init_nano() argument
271 struct sha1_state *sctx = shash_desc_ctx(desc); in padlock_sha1_init_nano()
280 static int padlock_sha1_update_nano(struct shash_desc *desc, in padlock_sha1_update_nano() argument
283 struct sha1_state *sctx = shash_desc_ctx(desc); in padlock_sha1_update_nano()
329 static int padlock_sha1_final_nano(struct shash_desc *desc, u8 *out) in padlock_sha1_final_nano() argument
331 struct sha1_state *state = (struct sha1_state *)shash_desc_ctx(desc); in padlock_sha1_final_nano()
341 padlock_sha1_update_nano(desc, padding, padlen); in padlock_sha1_final_nano()
344 padlock_sha1_update_nano(desc, (const u8 *)&bits, sizeof(bits)); in padlock_sha1_final_nano()
352 static int padlock_sha256_init_nano(struct shash_desc *desc) in padlock_sha256_init_nano() argument
354 struct sha256_state *sctx = shash_desc_ctx(desc); in padlock_sha256_init_nano()
364 static int padlock_sha256_update_nano(struct shash_desc *desc, const u8 *data, in padlock_sha256_update_nano() argument
367 struct sha256_state *sctx = shash_desc_ctx(desc); in padlock_sha256_update_nano()
413 static int padlock_sha256_final_nano(struct shash_desc *desc, u8 *out) in padlock_sha256_final_nano() argument
416 (struct sha256_state *)shash_desc_ctx(desc); in padlock_sha256_final_nano()
426 padlock_sha256_update_nano(desc, padding, padlen); in padlock_sha256_final_nano()
429 padlock_sha256_update_nano(desc, (const u8 *)&bits, sizeof(bits)); in padlock_sha256_final_nano()
437 static int padlock_sha_export_nano(struct shash_desc *desc, in padlock_sha_export_nano() argument
440 int statesize = crypto_shash_statesize(desc->tfm); in padlock_sha_export_nano()
441 void *sctx = shash_desc_ctx(desc); in padlock_sha_export_nano()
447 static int padlock_sha_import_nano(struct shash_desc *desc, in padlock_sha_import_nano() argument
450 int statesize = crypto_shash_statesize(desc->tfm); in padlock_sha_import_nano()
451 void *sctx = shash_desc_ctx(desc); in padlock_sha_import_nano()