• Home
  • Raw
  • Download

Lines Matching refs:sctx

31 	struct sha1_state *sctx = shash_desc_ctx(desc);  in sha1_sparc64_init()  local
33 *sctx = (struct sha1_state){ in sha1_sparc64_init()
40 static void __sha1_sparc64_update(struct sha1_state *sctx, const u8 *data, in __sha1_sparc64_update() argument
45 sctx->count += len; in __sha1_sparc64_update()
48 memcpy(sctx->buffer + partial, data, done); in __sha1_sparc64_update()
49 sha1_sparc64_transform(sctx->state, sctx->buffer, 1); in __sha1_sparc64_update()
54 sha1_sparc64_transform(sctx->state, data + done, rounds); in __sha1_sparc64_update()
58 memcpy(sctx->buffer, data + done, len - done); in __sha1_sparc64_update()
64 struct sha1_state *sctx = shash_desc_ctx(desc); in sha1_sparc64_update() local
65 unsigned int partial = sctx->count % SHA1_BLOCK_SIZE; in sha1_sparc64_update()
69 sctx->count += len; in sha1_sparc64_update()
70 memcpy(sctx->buffer + partial, data, len); in sha1_sparc64_update()
72 __sha1_sparc64_update(sctx, data, len, partial); in sha1_sparc64_update()
80 struct sha1_state *sctx = shash_desc_ctx(desc); in sha1_sparc64_final() local
86 bits = cpu_to_be64(sctx->count << 3); in sha1_sparc64_final()
89 index = sctx->count % SHA1_BLOCK_SIZE; in sha1_sparc64_final()
94 sctx->count += padlen; in sha1_sparc64_final()
95 memcpy(sctx->buffer + index, padding, padlen); in sha1_sparc64_final()
97 __sha1_sparc64_update(sctx, padding, padlen, index); in sha1_sparc64_final()
99 __sha1_sparc64_update(sctx, (const u8 *)&bits, sizeof(bits), 56); in sha1_sparc64_final()
103 dst[i] = cpu_to_be32(sctx->state[i]); in sha1_sparc64_final()
106 memset(sctx, 0, sizeof(*sctx)); in sha1_sparc64_final()
113 struct sha1_state *sctx = shash_desc_ctx(desc); in sha1_sparc64_export() local
115 memcpy(out, sctx, sizeof(*sctx)); in sha1_sparc64_export()
122 struct sha1_state *sctx = shash_desc_ctx(desc); in sha1_sparc64_import() local
124 memcpy(sctx, in, sizeof(*sctx)); in sha1_sparc64_import()