• Home
  • Raw
  • Download

Lines Matching refs:sctx

31 	struct sha256_state *sctx = shash_desc_ctx(desc);  in sha224_sparc64_init()  local
32 sctx->state[0] = SHA224_H0; in sha224_sparc64_init()
33 sctx->state[1] = SHA224_H1; in sha224_sparc64_init()
34 sctx->state[2] = SHA224_H2; in sha224_sparc64_init()
35 sctx->state[3] = SHA224_H3; in sha224_sparc64_init()
36 sctx->state[4] = SHA224_H4; in sha224_sparc64_init()
37 sctx->state[5] = SHA224_H5; in sha224_sparc64_init()
38 sctx->state[6] = SHA224_H6; in sha224_sparc64_init()
39 sctx->state[7] = SHA224_H7; in sha224_sparc64_init()
40 sctx->count = 0; in sha224_sparc64_init()
47 struct sha256_state *sctx = shash_desc_ctx(desc); in sha256_sparc64_init() local
48 sctx->state[0] = SHA256_H0; in sha256_sparc64_init()
49 sctx->state[1] = SHA256_H1; in sha256_sparc64_init()
50 sctx->state[2] = SHA256_H2; in sha256_sparc64_init()
51 sctx->state[3] = SHA256_H3; in sha256_sparc64_init()
52 sctx->state[4] = SHA256_H4; in sha256_sparc64_init()
53 sctx->state[5] = SHA256_H5; in sha256_sparc64_init()
54 sctx->state[6] = SHA256_H6; in sha256_sparc64_init()
55 sctx->state[7] = SHA256_H7; in sha256_sparc64_init()
56 sctx->count = 0; in sha256_sparc64_init()
61 static void __sha256_sparc64_update(struct sha256_state *sctx, const u8 *data, in __sha256_sparc64_update() argument
66 sctx->count += len; in __sha256_sparc64_update()
69 memcpy(sctx->buf + partial, data, done); in __sha256_sparc64_update()
70 sha256_sparc64_transform(sctx->state, sctx->buf, 1); in __sha256_sparc64_update()
75 sha256_sparc64_transform(sctx->state, data + done, rounds); in __sha256_sparc64_update()
79 memcpy(sctx->buf, data + done, len - done); in __sha256_sparc64_update()
85 struct sha256_state *sctx = shash_desc_ctx(desc); in sha256_sparc64_update() local
86 unsigned int partial = sctx->count % SHA256_BLOCK_SIZE; in sha256_sparc64_update()
90 sctx->count += len; in sha256_sparc64_update()
91 memcpy(sctx->buf + partial, data, len); in sha256_sparc64_update()
93 __sha256_sparc64_update(sctx, data, len, partial); in sha256_sparc64_update()
100 struct sha256_state *sctx = shash_desc_ctx(desc); in sha256_sparc64_final() local
106 bits = cpu_to_be64(sctx->count << 3); in sha256_sparc64_final()
109 index = sctx->count % SHA256_BLOCK_SIZE; in sha256_sparc64_final()
114 sctx->count += padlen; in sha256_sparc64_final()
115 memcpy(sctx->buf + index, padding, padlen); in sha256_sparc64_final()
117 __sha256_sparc64_update(sctx, padding, padlen, index); in sha256_sparc64_final()
119 __sha256_sparc64_update(sctx, (const u8 *)&bits, sizeof(bits), 56); in sha256_sparc64_final()
123 dst[i] = cpu_to_be32(sctx->state[i]); in sha256_sparc64_final()
126 memset(sctx, 0, sizeof(*sctx)); in sha256_sparc64_final()
145 struct sha256_state *sctx = shash_desc_ctx(desc); in sha256_sparc64_export() local
147 memcpy(out, sctx, sizeof(*sctx)); in sha256_sparc64_export()
153 struct sha256_state *sctx = shash_desc_ctx(desc); in sha256_sparc64_import() local
155 memcpy(sctx, in, sizeof(*sctx)); in sha256_sparc64_import()