Home
last modified time | relevance | path

Searched refs:md (Results 1 – 25 of 290) sorted by relevance

12345678910>>...12

/external/dropbear/libtomcrypt/src/hashes/
Dmd2.c60 static void md2_update_chksum(hash_state *md) in md2_update_chksum() argument
64 L = md->md2.chksum[15]; in md2_update_chksum()
70 L = (md->md2.chksum[j] ^= PI_SUBST[(int)(md->md2.buf[j] ^ L)] & 255); in md2_update_chksum()
74 static void md2_compress(hash_state *md) in md2_compress() argument
81 md->md2.X[16+j] = md->md2.buf[j]; in md2_compress()
82 md->md2.X[32+j] = md->md2.X[j] ^ md->md2.X[16+j]; in md2_compress()
90 t = (md->md2.X[k] ^= PI_SUBST[(int)(t & 255)]); in md2_compress()
101 int md2_init(hash_state *md) in md2_init() argument
103 LTC_ARGCHK(md != NULL); in md2_init()
106 zeromem(md->md2.X, sizeof(md->md2.X)); in md2_init()
[all …]
Dsha1.c45 static int _sha1_compress(hash_state *md, unsigned char *buf) in _sha1_compress() argument
47 static int sha1_compress(hash_state *md, unsigned char *buf) in _sha1_compress()
61 a = md->sha1.state[0]; in _sha1_compress()
62 b = md->sha1.state[1]; in _sha1_compress()
63 c = md->sha1.state[2]; in _sha1_compress()
64 d = md->sha1.state[3]; in _sha1_compress()
65 e = md->sha1.state[4]; in _sha1_compress()
141 md->sha1.state[0] = md->sha1.state[0] + a; in _sha1_compress()
142 md->sha1.state[1] = md->sha1.state[1] + b; in _sha1_compress()
143 md->sha1.state[2] = md->sha1.state[2] + c; in _sha1_compress()
[all …]
Dmd4.c76 static int _md4_compress(hash_state *md, unsigned char *buf) in _md4_compress() argument
78 static int md4_compress(hash_state *md, unsigned char *buf) in _md4_compress()
85 a = md->md4.state[0]; in _md4_compress()
86 b = md->md4.state[1]; in _md4_compress()
87 c = md->md4.state[2]; in _md4_compress()
88 d = md->md4.state[3]; in _md4_compress()
151 md->md4.state[0] = md->md4.state[0] + a; in _md4_compress()
152 md->md4.state[1] = md->md4.state[1] + b; in _md4_compress()
153 md->md4.state[2] = md->md4.state[2] + c; in _md4_compress()
154 md->md4.state[3] = md->md4.state[3] + d; in _md4_compress()
[all …]
Dmd5.c101 static int _md5_compress(hash_state *md, unsigned char *buf) in _md5_compress() argument
103 static int md5_compress(hash_state *md, unsigned char *buf) in _md5_compress()
117 a = md->md5.state[0]; in _md5_compress()
118 b = md->md5.state[1]; in _md5_compress()
119 c = md->md5.state[2]; in _md5_compress()
120 d = md->md5.state[3]; in _md5_compress()
210 md->md5.state[0] = md->md5.state[0] + a; in _md5_compress()
211 md->md5.state[1] = md->md5.state[1] + b; in _md5_compress()
212 md->md5.state[2] = md->md5.state[2] + c; in _md5_compress()
213 md->md5.state[3] = md->md5.state[3] + d; in _md5_compress()
[all …]
Drmd256.c78 static int _rmd256_compress(hash_state *md, unsigned char *buf) in _rmd256_compress() argument
80 static int rmd256_compress(hash_state *md, unsigned char *buf) in _rmd256_compress()
92 aa = md->rmd256.state[0]; in _rmd256_compress()
93 bb = md->rmd256.state[1]; in _rmd256_compress()
94 cc = md->rmd256.state[2]; in _rmd256_compress()
95 dd = md->rmd256.state[3]; in _rmd256_compress()
96 aaa = md->rmd256.state[4]; in _rmd256_compress()
97 bbb = md->rmd256.state[5]; in _rmd256_compress()
98 ccc = md->rmd256.state[6]; in _rmd256_compress()
99 ddd = md->rmd256.state[7]; in _rmd256_compress()
[all …]
Drmd128.c84 static int _rmd128_compress(hash_state *md, unsigned char *buf) in _rmd128_compress() argument
86 static int rmd128_compress(hash_state *md, unsigned char *buf) in _rmd128_compress()
98 aa = aaa = md->rmd128.state[0]; in _rmd128_compress()
99 bb = bbb = md->rmd128.state[1]; in _rmd128_compress()
100 cc = ccc = md->rmd128.state[2]; in _rmd128_compress()
101 dd = ddd = md->rmd128.state[3]; in _rmd128_compress()
248 ddd += cc + md->rmd128.state[1]; /* final result for MDbuf[0] */ in _rmd128_compress()
249 md->rmd128.state[1] = md->rmd128.state[2] + dd + aaa; in _rmd128_compress()
250 md->rmd128.state[2] = md->rmd128.state[3] + aa + bbb; in _rmd128_compress()
251 md->rmd128.state[3] = md->rmd128.state[0] + bb + ccc; in _rmd128_compress()
[all …]
Drmd320.c98 static int _rmd320_compress(hash_state *md, unsigned char *buf) in _rmd320_compress() argument
100 static int rmd320_compress(hash_state *md, unsigned char *buf) in _rmd320_compress()
112 aa = md->rmd320.state[0]; in _rmd320_compress()
113 bb = md->rmd320.state[1]; in _rmd320_compress()
114 cc = md->rmd320.state[2]; in _rmd320_compress()
115 dd = md->rmd320.state[3]; in _rmd320_compress()
116 ee = md->rmd320.state[4]; in _rmd320_compress()
117 aaa = md->rmd320.state[5]; in _rmd320_compress()
118 bbb = md->rmd320.state[6]; in _rmd320_compress()
119 ccc = md->rmd320.state[7]; in _rmd320_compress()
[all …]
/external/apache-harmony/security/src/test/api/java/org/apache/harmony/security/tests/java/security/
DMessageDigest1Test.java37 MyMessageDigest1 md = new MyMessageDigest1("ABC"); in test_reset() local
38 md.reset(); in test_reset()
39 assertTrue(md.runEngineReset); in test_reset()
46 MyMessageDigest1 md = new MyMessageDigest1("ABC"); in test_updateLB() local
47 md.update((byte) 1); in test_updateLB()
48 assertTrue(md.runEngineUpdate1); in test_updateLB()
55 MyMessageDigest1 md = new MyMessageDigest1("ABC"); in test_updateLB$LILI() local
57 md.update(bytes, 1, 2); in test_updateLB$LILI()
58 assertTrue(md.runEngineUpdate2); in test_updateLB$LILI()
63 md.update(null, 0, 1); in test_updateLB$LILI()
[all …]
/external/wpa_supplicant_8/src/crypto/
Dsha256-internal.c27 static void sha256_init(struct sha256_state *md);
28 static int sha256_process(struct sha256_state *md, const unsigned char *in,
30 static int sha256_done(struct sha256_state *md, unsigned char *out);
97 static int sha256_compress(struct sha256_state *md, unsigned char *buf) in sha256_compress() argument
105 S[i] = md->state[i]; in sha256_compress()
133 md->state[i] = md->state[i] + S[i]; in sha256_compress()
140 static void sha256_init(struct sha256_state *md) in sha256_init() argument
142 md->curlen = 0; in sha256_init()
143 md->length = 0; in sha256_init()
144 md->state[0] = 0x6A09E667UL; in sha256_init()
[all …]
/external/dropbear/libtomcrypt/src/headers/
Dtomcrypt_hash.h196 int chc_init(hash_state * md);
197 int chc_process(hash_state * md, const unsigned char *in, unsigned long inlen);
198 int chc_done(hash_state * md, unsigned char *hash);
204 int whirlpool_init(hash_state * md);
205 int whirlpool_process(hash_state * md, const unsigned char *in, unsigned long inlen);
206 int whirlpool_done(hash_state * md, unsigned char *hash);
212 int sha512_init(hash_state * md);
213 int sha512_process(hash_state * md, const unsigned char *in, unsigned long inlen);
214 int sha512_done(hash_state * md, unsigned char *hash);
223 int sha384_init(hash_state * md);
[all …]
/external/pcre/
Dpcre_exec.c49 #define NLBLOCK md /* Block containing newline information */
85 md->mark = markptr; \
120 pchars(const uschar *p, int length, BOOL is_subject, match_data *md) in pchars() argument
123 if (is_subject && length > md->end_subject - p) length = md->end_subject - p; in pchars()
149 match_ref(int offset, register USPTR eptr, int length, match_data *md, in match_ref() argument
152 USPTR p = md->start_subject + md->offset_vector[offset]; in match_ref()
155 if (eptr >= md->end_subject) in match_ref()
160 pchars(eptr, length, TRUE, md); in match_ref()
163 pchars(p, length, FALSE, md); in match_ref()
169 if (length > md->end_subject - eptr) return FALSE; in match_ref()
[all …]
/external/dropbear/libtomcrypt/src/hashes/chc/
Dchc.c87 int chc_init(hash_state *md) in chc_init() argument
93 LTC_ARGCHK(md != NULL); in chc_init()
116 cipher_descriptor[cipher_idx].ecb_encrypt(buf, md->chc.state, key); in chc_init()
119 md->chc.length = 0; in chc_init()
120 md->chc.curlen = 0; in chc_init()
121 zeromem(md->chc.buf, sizeof(md->chc.buf)); in chc_init()
132 static int chc_compress(hash_state *md, unsigned char *buf) in chc_compress() argument
141 …if ((err = cipher_descriptor[cipher_idx].setup(md->chc.state, cipher_blocksize, 0, key)) != CRYPT_… in chc_compress()
148 md->chc.state[x] ^= T[0][x] ^ T[1][x]; in chc_compress()
159 int _chc_process(hash_state * md, const unsigned char *buf, unsigned long len);
[all …]
/external/dropbear/libtomcrypt/src/hashes/whirl/
Dwhirl.c57 static int _whirlpool_compress(hash_state *md, unsigned char *buf) in _whirlpool_compress() argument
59 static int whirlpool_compress(hash_state *md, unsigned char *buf) in _whirlpool_compress()
67 K[0][x] = md->whirlpool.state[x]; in _whirlpool_compress()
105 md->whirlpool.state[x] ^= T[0][x] ^ T[2][x]; in _whirlpool_compress()
113 static int whirlpool_compress(hash_state *md, unsigned char *buf) in whirlpool_compress() argument
116 err = _whirlpool_compress(md, buf); in whirlpool_compress()
128 int whirlpool_init(hash_state * md) in whirlpool_init() argument
130 LTC_ARGCHK(md != NULL); in whirlpool_init()
131 zeromem(&md->whirlpool, sizeof(md->whirlpool)); in whirlpool_init()
150 int whirlpool_done(hash_state * md, unsigned char *out) in whirlpool_done() argument
[all …]
/external/wpa_supplicant/
Dsha256.c165 static void sha256_init(struct sha256_state *md);
166 static int sha256_process(struct sha256_state *md, const unsigned char *in,
168 static int sha256_done(struct sha256_state *md, unsigned char *out);
231 static int sha256_compress(struct sha256_state *md, unsigned char *buf) in sha256_compress() argument
239 S[i] = md->state[i]; in sha256_compress()
267 md->state[i] = md->state[i] + S[i]; in sha256_compress()
274 static void sha256_init(struct sha256_state *md) in sha256_init() argument
276 md->curlen = 0; in sha256_init()
277 md->length = 0; in sha256_init()
278 md->state[0] = 0x6A09E667UL; in sha256_init()
[all …]
/external/wpa_supplicant_6/wpa_supplicant/src/crypto/
Dsha256.c168 static void sha256_init(struct sha256_state *md);
169 static int sha256_process(struct sha256_state *md, const unsigned char *in,
171 static int sha256_done(struct sha256_state *md, unsigned char *out);
234 static int sha256_compress(struct sha256_state *md, unsigned char *buf) in sha256_compress() argument
242 S[i] = md->state[i]; in sha256_compress()
270 md->state[i] = md->state[i] + S[i]; in sha256_compress()
277 static void sha256_init(struct sha256_state *md) in sha256_init() argument
279 md->curlen = 0; in sha256_init()
280 md->length = 0; in sha256_init()
281 md->state[0] = 0x6A09E667UL; in sha256_init()
[all …]
/external/apache-harmony/security/src/test/impl/java/org/apache/harmony/security/tests/provider/crypto/
DSHA1_MessageDigestTest.java130 private static MessageDigest md; field in SHA1_MessageDigestTest
138 md = MessageDigest.getInstance("SHA-1", "Crypto"); in setUp()
158 md.update(bytes, 0, LENGTH); in testClone()
159 clone = (MessageDigest)md.clone(); in testClone()
160 digest = md.digest(); in testClone()
186 md.update(b, 0, b.length); in testDigest01()
187 bytes = md.digest(); in testDigest01()
190 md.reset(); in testDigest01()
209 md.update((byte)(j +1)); in testDigest02()
211 results = md.digest(); in testDigest02()
[all …]
/external/dropbear/libtomcrypt/src/hashes/sha2/
Dsha384.c39 int sha384_init(hash_state * md) in sha384_init() argument
41 LTC_ARGCHK(md != NULL); in sha384_init()
43 md->sha512.curlen = 0; in sha384_init()
44 md->sha512.length = 0; in sha384_init()
45 md->sha512.state[0] = CONST64(0xcbbb9d5dc1059ed8); in sha384_init()
46 md->sha512.state[1] = CONST64(0x629a292a367cd507); in sha384_init()
47 md->sha512.state[2] = CONST64(0x9159015a3070dd17); in sha384_init()
48 md->sha512.state[3] = CONST64(0x152fecd8f70e5939); in sha384_init()
49 md->sha512.state[4] = CONST64(0x67332667ffc00b31); in sha384_init()
50 md->sha512.state[5] = CONST64(0x8eb44a8768581511); in sha384_init()
[all …]
Dsha512.c94 static int _sha512_compress(hash_state * md, unsigned char *buf) in _sha512_compress() argument
96 static int sha512_compress(hash_state * md, unsigned char *buf) in _sha512_compress()
104 S[i] = md->sha512.state[i]; in _sha512_compress()
153 md->sha512.state[i] = md->sha512.state[i] + S[i]; in _sha512_compress()
161 static int sha512_compress(hash_state * md, unsigned char *buf) in sha512_compress() argument
164 err = _sha512_compress(md, buf); in sha512_compress()
175 int sha512_init(hash_state * md) in sha512_init() argument
177 LTC_ARGCHK(md != NULL); in sha512_init()
178 md->sha512.curlen = 0; in sha512_init()
179 md->sha512.length = 0; in sha512_init()
[all …]
Dsha224.c40 int sha224_init(hash_state * md) in sha224_init() argument
42 LTC_ARGCHK(md != NULL); in sha224_init()
44 md->sha256.curlen = 0; in sha224_init()
45 md->sha256.length = 0; in sha224_init()
46 md->sha256.state[0] = 0xc1059ed8UL; in sha224_init()
47 md->sha256.state[1] = 0x367cd507UL; in sha224_init()
48 md->sha256.state[2] = 0x3070dd17UL; in sha224_init()
49 md->sha256.state[3] = 0xf70e5939UL; in sha224_init()
50 md->sha256.state[4] = 0xffc00b31UL; in sha224_init()
51 md->sha256.state[5] = 0x68581511UL; in sha224_init()
[all …]
Dsha256.c69 static int _sha256_compress(hash_state * md, unsigned char *buf) in _sha256_compress() argument
71 static int sha256_compress(hash_state * md, unsigned char *buf) in _sha256_compress()
82 S[i] = md->sha256.state[i]; in _sha256_compress()
186 md->sha256.state[i] = md->sha256.state[i] + S[i]; in _sha256_compress()
192 static int sha256_compress(hash_state * md, unsigned char *buf) in sha256_compress() argument
195 err = _sha256_compress(md, buf); in sha256_compress()
206 int sha256_init(hash_state * md) in sha256_init() argument
208 LTC_ARGCHK(md != NULL); in sha256_init()
210 md->sha256.curlen = 0; in sha256_init()
211 md->sha256.length = 0; in sha256_init()
[all …]
/external/qemu/telephony/
Dmodem_driver.c43 ModemDriver* md = _md; in modem_driver_unsol() local
46 qemu_chr_write(md->cs, (const uint8_t*)message, len); in modem_driver_unsol()
52 ModemDriver* md = _md; in modem_driver_can_read() local
53 int ret = sizeof(md->in_buff) - md->in_pos; in modem_driver_can_read()
62 ModemDriver* md = _md; in modem_driver_read() local
83 if (md->in_sms) { in modem_driver_read()
87 md->in_buff[ md->in_pos ] = c; in modem_driver_read()
88 md->in_pos++; in modem_driver_read()
89 md->in_sms = 0; in modem_driver_read()
96 if (md->in_pos == 0) /* skip empty lines */ in modem_driver_read()
[all …]
/external/openssl/crypto/evp/
Dbio_ok.c153 EVP_MD_CTX md; member
193 EVP_MD_CTX_init(&ctx->md); in ok_new()
204 EVP_MD_CTX_cleanup(&((BIO_OK_CTX *)a->ptr)->md); in ok_free()
347 EVP_MD *md; in ok_ctrl() local
410 md=ptr; in ok_ctrl()
411 EVP_DigestInit_ex(&ctx->md, md, NULL); in ok_ctrl()
418 *ppmd=ctx->md.digest; in ok_ctrl()
461 EVP_MD_CTX *md; in sig_out() local
464 md=&ctx->md; in sig_out()
466 if(ctx->buf_len+ 2* md->digest->md_size > OK_BLOCK_SIZE) return; in sig_out()
[all …]
/external/openssl/crypto/hmac/
Dhmac.c65 const EVP_MD *md, ENGINE *impl) in HMAC_Init_ex() argument
70 if (md != NULL) in HMAC_Init_ex()
73 ctx->md=md; in HMAC_Init_ex()
76 md=ctx->md; in HMAC_Init_ex()
81 j=EVP_MD_block_size(md); in HMAC_Init_ex()
85 if (!EVP_DigestInit_ex(&ctx->md_ctx,md, impl)) in HMAC_Init_ex()
108 if (!EVP_DigestInit_ex(&ctx->i_ctx,md, impl)) in HMAC_Init_ex()
110 if (!EVP_DigestUpdate(&ctx->i_ctx,pad,EVP_MD_block_size(md))) in HMAC_Init_ex()
115 if (!EVP_DigestInit_ex(&ctx->o_ctx,md, impl)) in HMAC_Init_ex()
117 if (!EVP_DigestUpdate(&ctx->o_ctx,pad,EVP_MD_block_size(md))) in HMAC_Init_ex()
[all …]
/external/openssl/crypto/conf/
Dconf_mod.c110 static void module_free(CONF_MODULE *md);
209 CONF_MODULE *md; in module_run() local
212 md = module_find(name); in module_run()
215 if (!md && !(flags & CONF_MFLAGS_NO_DSO)) in module_run()
216 md = module_load_dso(cnf, name, value, flags); in module_run()
218 if (!md) in module_run()
228 ret = module_init(md, name, value, cnf); in module_run()
253 CONF_MODULE *md; in module_load_dso() local
275 md = module_add(dso, name, ifunc, ffunc); in module_load_dso()
277 if (!md) in module_load_dso()
[all …]
/external/libpcap/
Dpcap-dag.c132 if(dag_stop_stream(p->fd, p->md.dag_stream) < 0) in dag_platform_close()
135 if(dag_detach_stream(p->fd, p->md.dag_stream) < 0) in dag_platform_close()
192 int flags = p->md.dag_offset_flags; in dag_read()
196 while (p->md.dag_mem_top - p->md.dag_mem_bottom < dag_record_size) { in dag_read()
223 p->md.dag_mem_top = dag_advance_stream(p->fd, p->md.dag_stream, &(p->md.dag_mem_bottom)); in dag_read()
226 p->md.dag_mem_top = dag_offset(p->fd, &(p->md.dag_mem_bottom), flags); in dag_read()
229 if (nonblocking && (p->md.dag_mem_top - p->md.dag_mem_bottom < dag_record_size)) in dag_read()
236 p->md.dag_timeout && in dag_read()
237 (p->md.dag_mem_top - p->md.dag_mem_bottom < dag_record_size)) in dag_read()
246 while (p->md.dag_mem_top - p->md.dag_mem_bottom >= dag_record_size) { in dag_read()
[all …]

12345678910>>...12