/external/dropbear/libtomcrypt/src/hashes/ |
D | md2.c | 60 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 …]
|
D | sha1.c | 45 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 …]
|
D | md4.c | 76 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 …]
|
D | md5.c | 101 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 …]
|
D | rmd256.c | 78 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 …]
|
D | rmd128.c | 84 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 …]
|
/external/apache-harmony/security/src/test/api/java/org/apache/harmony/security/tests/java/security/ |
D | MessageDigest1Test.java | 37 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/ |
D | sha256-internal.c | 81 static int sha256_compress(struct sha256_state *md, unsigned char *buf) in sha256_compress() argument 89 S[i] = md->state[i]; in sha256_compress() 117 md->state[i] = md->state[i] + S[i]; in sha256_compress() 124 void sha256_init(struct sha256_state *md) in sha256_init() argument 126 md->curlen = 0; in sha256_init() 127 md->length = 0; in sha256_init() 128 md->state[0] = 0x6A09E667UL; in sha256_init() 129 md->state[1] = 0xBB67AE85UL; in sha256_init() 130 md->state[2] = 0x3C6EF372UL; in sha256_init() 131 md->state[3] = 0xA54FF53AUL; in sha256_init() [all …]
|
/external/dropbear/libtomcrypt/src/hashes/whirl/ |
D | whirl.c | 57 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/dropbear/libtomcrypt/src/hashes/chc/ |
D | chc.c | 87 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/headers/ |
D | tomcrypt_hash.h | 196 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/dropbear/libtomcrypt/src/hashes/sha2/ |
D | sha384.c | 39 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 …]
|
D | sha512.c | 94 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 …]
|
D | sha224.c | 40 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 …]
|
D | sha256.c | 69 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/apache-harmony/security/src/test/impl/java/org/apache/harmony/security/tests/provider/crypto/ |
D | SHA1_MessageDigestTest.java | 130 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/qemu/telephony/ |
D | modem_driver.c | 43 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/ganymed-ssh2/src/main/java/ch/ethz/ssh2/crypto/digest/ |
D | HMAC.java | 15 Digest md; field in HMAC 23 public HMAC(Digest md, byte[] key, int size) in HMAC() argument 25 this.md = md; in HMAC() 28 tmp = new byte[md.getDigestLength()]; in HMAC() 37 md.reset(); in HMAC() 38 md.update(key); in HMAC() 39 md.digest(tmp); in HMAC() 51 md.update(k_xor_ipad); in HMAC() 61 md.update(b); in update() 66 md.update(b); in update() [all …]
|
D | HashForSSH2Types.java | 17 Digest md; field in HashForSSH2Types 19 public HashForSSH2Types(Digest md) in HashForSSH2Types() argument 21 this.md = md; in HashForSSH2Types() 28 md = new SHA1(); in HashForSSH2Types() 32 md = new MD5(); in HashForSSH2Types() 43 md.update(tmp); in updateByte() 48 md.update(b); in updateBytes() 53 md.update((byte) (v >> 24)); in updateUINT32() 54 md.update((byte) (v >> 16)); in updateUINT32() 55 md.update((byte) (v >> 8)); in updateUINT32() [all …]
|
/external/openssl/crypto/evp/ |
D | bio_ok.c | 153 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() 366 EVP_MD *md; in ok_ctrl() local 430 md=ptr; in ok_ctrl() 431 if (!EVP_DigestInit_ex(&ctx->md, md, NULL)) in ok_ctrl() 439 *ppmd=ctx->md.digest; in ok_ctrl() 482 EVP_MD_CTX *md; in sig_out() local 485 md=&ctx->md; in sig_out() 487 if(ctx->buf_len+ 2* md->digest->md_size > OK_BLOCK_SIZE) return 1; in sig_out() [all …]
|
D | e_rc4_hmac_md5.c | 74 MD5_CTX head,tail,md; member 96 key->md = key->head; in rc4_hmac_md5_init_key() 122 md5_off = MD5_CBLOCK-key->md.num, in rc4_hmac_md5_cipher() 139 MD5_Update(&key->md,in,md5_off); in rc4_hmac_md5_cipher() 143 &key->md,in+md5_off,blocks); in rc4_hmac_md5_cipher() 147 key->md.Nh += blocks>>29; in rc4_hmac_md5_cipher() 148 key->md.Nl += blocks<<=3; in rc4_hmac_md5_cipher() 149 if (key->md.Nl<(unsigned int)blocks) key->md.Nh++; in rc4_hmac_md5_cipher() 155 MD5_Update(&key->md,in+md5_off,plen-md5_off); in rc4_hmac_md5_cipher() 162 MD5_Final(out+plen,&key->md); in rc4_hmac_md5_cipher() [all …]
|
/external/openssl/crypto/hmac/ |
D | hmac.c | 69 const EVP_MD *md, ENGINE *impl) in HMAC_Init_ex() argument 88 return FIPS_hmac_init_ex(ctx, key, len, md, NULL); in HMAC_Init_ex() 92 if (md != NULL) in HMAC_Init_ex() 95 ctx->md=md; in HMAC_Init_ex() 98 md=ctx->md; in HMAC_Init_ex() 103 j=EVP_MD_block_size(md); in HMAC_Init_ex() 107 if (!EVP_DigestInit_ex(&ctx->md_ctx,md, impl)) in HMAC_Init_ex() 130 if (!EVP_DigestInit_ex(&ctx->i_ctx,md, impl)) in HMAC_Init_ex() 132 if (!EVP_DigestUpdate(&ctx->i_ctx,pad,EVP_MD_block_size(md))) in HMAC_Init_ex() 137 if (!EVP_DigestInit_ex(&ctx->o_ctx,md, impl)) in HMAC_Init_ex() [all …]
|
/external/openssl/crypto/conf/ |
D | conf_mod.c | 110 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/smack/src/com/novell/sasl/client/ |
D | DigestMD5SaslClient.java | 443 MessageDigest md = MessageDigest.getInstance("MD5"); in DigestCalcHA1() local 445 md.update(userName.getBytes("UTF-8")); in DigestCalcHA1() 446 md.update(":".getBytes("UTF-8")); in DigestCalcHA1() 447 md.update(realm.getBytes("UTF-8")); in DigestCalcHA1() 448 md.update(":".getBytes("UTF-8")); in DigestCalcHA1() 449 md.update(password.getBytes("UTF-8")); in DigestCalcHA1() 450 hash = md.digest(); in DigestCalcHA1() 454 md.update(hash); in DigestCalcHA1() 455 md.update(":".getBytes("UTF-8")); in DigestCalcHA1() 456 md.update(nonce.getBytes("UTF-8")); in DigestCalcHA1() [all …]
|
/external/smack/asmack-master/static-src/novell-openldap-jldap/com/novell/sasl/client/ |
D | DigestMD5SaslClient.java | 443 MessageDigest md = MessageDigest.getInstance("MD5"); in DigestCalcHA1() local 445 md.update(userName.getBytes("UTF-8")); in DigestCalcHA1() 446 md.update(":".getBytes("UTF-8")); in DigestCalcHA1() 447 md.update(realm.getBytes("UTF-8")); in DigestCalcHA1() 448 md.update(":".getBytes("UTF-8")); in DigestCalcHA1() 449 md.update(password.getBytes("UTF-8")); in DigestCalcHA1() 450 hash = md.digest(); in DigestCalcHA1() 454 md.update(hash); in DigestCalcHA1() 455 md.update(":".getBytes("UTF-8")); in DigestCalcHA1() 456 md.update(nonce.getBytes("UTF-8")); in DigestCalcHA1() [all …]
|