/external/smack/src/org/xbill/DNS/ |
D | NSEC3PARAMRecord.java | 28 private byte salt[]; field in NSEC3PARAMRecord 48 int flags, int iterations, byte [] salt) in NSEC3PARAMRecord() argument 55 if (salt != null) { in NSEC3PARAMRecord() 56 if (salt.length > 255) in NSEC3PARAMRecord() 59 if (salt.length > 0) { in NSEC3PARAMRecord() 60 this.salt = new byte[salt.length]; in NSEC3PARAMRecord() 61 System.arraycopy(salt, 0, this.salt, 0, salt.length); in NSEC3PARAMRecord() 74 salt = in.readByteArray(salt_length); in rrFromWire() 76 salt = null; in rrFromWire() 85 if (salt != null) { in rrToWire() [all …]
|
D | NSEC3Record.java | 51 private byte [] salt; field in NSEC3Record 78 int flags, int iterations, byte [] salt, byte [] next, in NSEC3Record() argument 86 if (salt != null) { in NSEC3Record() 87 if (salt.length > 255) in NSEC3Record() 89 if (salt.length > 0) { in NSEC3Record() 90 this.salt = new byte[salt.length]; in NSEC3Record() 91 System.arraycopy(salt, 0, this.salt, 0, salt.length); in NSEC3Record() 111 salt = in.readByteArray(salt_length); in rrFromWire() 113 salt = null; in rrFromWire() 126 if (salt != null) { in rrToWire() [all …]
|
/external/apache-harmony/crypto/src/test/api/java/org/apache/harmony/crypto/tests/javax/crypto/spec/ |
D | PBEKeySpecTest.java | 67 byte[] salt = new byte[] {1, 2, 3, 4, 5}; in testPBEKeySpec2() 72 PBEKeySpec pbeks = new PBEKeySpec(null, salt, in testPBEKeySpec2() 99 new PBEKeySpec(password, salt, -1, keyLength); in testPBEKeySpec2() 106 new PBEKeySpec(password, salt, iterationCount, -1); in testPBEKeySpec2() 113 new PBEKeySpec(password, salt, 0, keyLength); in testPBEKeySpec2() 120 new PBEKeySpec(password, salt, iterationCount, 0); in testPBEKeySpec2() 126 PBEKeySpec pbeks = new PBEKeySpec(password, salt, in testPBEKeySpec2() 132 salt[0] ++; in testPBEKeySpec2() 135 salt[0] == pbeks.getSalt()[0]); in testPBEKeySpec2() 146 byte[] salt = new byte[] {1, 2, 3, 4, 5}; in testPBEKeySpec3() [all …]
|
D | PBEParameterSpecTest.java | 43 byte[] salt = {1, 2, 3, 4, 5}; in testPBEParameterSpec() 53 PBEParameterSpec pbeps = new PBEParameterSpec(salt, iterationCount); in testPBEParameterSpec() 54 salt[0] ++; in testPBEParameterSpec() 57 salt[0] == pbeps.getSalt()[0]); in testPBEParameterSpec() 66 byte[] salt = new byte[] {1, 2, 3, 4, 5}; in testGetSalt() 68 PBEParameterSpec pbeps = new PBEParameterSpec(salt, iterationCount); in testGetSalt() 70 if (! Arrays.equals(salt, result)) { in testGetSalt() 85 byte[] salt = new byte[] {1, 2, 3, 4, 5}; in testGetIterationCount() 87 PBEParameterSpec pbeps = new PBEParameterSpec(salt, iterationCount); in testGetIterationCount()
|
/external/openssl/crypto/des/ |
D | fcrypt.c | 61 char *DES_crypt(const char *buf, const char *salt) in DES_crypt() argument 66 return(DES_fcrypt(buf,salt,buff)); in DES_crypt() 73 if ((e_salt[0] = salt[0]) != '\0') in DES_crypt() 74 e_salt[1] = salt[1]; in DES_crypt() 99 char *DES_fcrypt(const char *buf, const char *salt, char *ret) in DES_fcrypt() argument 119 x=ret[0]=((salt[0] == '\0')?'A':salt[0]); in DES_fcrypt() 121 x=ret[1]=((salt[1] == '\0')?'A':salt[1]); in DES_fcrypt() 124 x=ret[0]=((salt[0] == '\0')?os_toascii['A']:salt[0]); in DES_fcrypt() 126 x=ret[1]=((salt[1] == '\0')?os_toascii['A']:salt[1]); in DES_fcrypt()
|
/external/openssl/crypto/pkcs12/ |
D | p12_mutl.c | 72 unsigned char key[EVP_MAX_MD_SIZE], *salt; in PKCS12_gen_mac() local 82 salt = p12->mac->salt->data; in PKCS12_gen_mac() 83 saltlen = p12->mac->salt->length; in PKCS12_gen_mac() 94 if(!PKCS12_key_gen (pass, passlen, salt, saltlen, PKCS12_MAC_ID, iter, in PKCS12_gen_mac() 133 unsigned char *salt, int saltlen, int iter, const EVP_MD *md_type) in PKCS12_set_mac() argument 139 if (PKCS12_setup_mac (p12, iter, salt, saltlen, md_type) == in PKCS12_set_mac() 156 int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, int saltlen, in PKCS12_setup_mac() argument 171 p12->mac->salt->length = saltlen; in PKCS12_setup_mac() 172 if (!(p12->mac->salt->data = OPENSSL_malloc (saltlen))) { in PKCS12_setup_mac() 176 if (!salt) { in PKCS12_setup_mac() [all …]
|
D | p12_crpt.c | 74 unsigned char *salt; in PKCS12_PBE_keyivgen() local 93 salt = pbe->salt->data; in PKCS12_PBE_keyivgen() 94 saltlen = pbe->salt->length; in PKCS12_PBE_keyivgen() 95 if (!PKCS12_key_gen (pass, passlen, salt, saltlen, PKCS12_KEY_ID, in PKCS12_PBE_keyivgen() 101 if (!PKCS12_key_gen (pass, passlen, salt, saltlen, PKCS12_IV_ID, in PKCS12_PBE_keyivgen()
|
/external/openssh/ |
D | auth2-jpake.c | 220 fake_salt_and_scheme(Authctxt *authctxt, char **salt, char **scheme) in fake_salt_and_scheme() argument 240 xasprintf(salt, "$1$%s$", makesalt(8, authctxt->user)); in fake_salt_and_scheme() 243 *salt = xstrdup(makesalt(2, authctxt->user)); in fake_salt_and_scheme() 248 xasprintf(salt, "_%c%c%c%c%s", in fake_salt_and_scheme() 257 xasprintf(salt, "$2a$%02lld$%s", rounds, in fake_salt_and_scheme() 263 __func__, *scheme, authctxt->user, *salt); in fake_salt_and_scheme() 273 char **hash_scheme, char **salt) in auth2_jpake_get_pwdata() argument 284 *salt = NULL; in auth2_jpake_get_pwdata() 294 *salt = xmalloc(salt_len); in auth2_jpake_get_pwdata() 295 strlcpy(*salt, authctxt->pw->pw_passwd, salt_len); in auth2_jpake_get_pwdata() [all …]
|
/external/openssh/openbsd-compat/ |
D | xcrypt.c | 61 xcrypt(const char *password, const char *salt) in xcrypt() argument 66 if (is_md5_salt(salt)) in xcrypt() 67 crypted = md5_crypt(password, salt); in xcrypt() 69 crypted = crypt(password, salt); in xcrypt() 72 crypted = bigcrypt(password, salt); in xcrypt() 74 crypted = crypt(password, salt); in xcrypt() 76 crypted = bigcrypt(password, salt); in xcrypt() 78 crypted = crypt(password, salt); in xcrypt()
|
D | port-uw.c | 56 char *salt; in sys_auth_passwd() local 67 salt = (pw_password[0] && pw_password[1]) ? pw_password : "xx"; in sys_auth_passwd() 75 result = ((strcmp(bigcrypt(password, salt), pw_password) == 0) in sys_auth_passwd() 76 || (strcmp(osr5bigcrypt(password, salt), pw_password) == 0)); in sys_auth_passwd() 80 result = (strcmp(xcrypt(password, salt), pw_password) == 0); in sys_auth_passwd()
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/asn1/pkcs/ |
D | PBEParameter.java | 18 ASN1OctetString salt; field in PBEParameter 21 byte[] salt, in PBEParameter() argument 24 if (salt.length != 8) in PBEParameter() 28 this.salt = new DEROctetString(salt); in PBEParameter() 35 salt = (ASN1OctetString)seq.getObjectAt(0); in PBEParameter() 61 return salt.getOctets(); in getSalt() 68 v.add(salt); in toASN1Primitive()
|
D | MacData.java | 21 byte[] salt; field in MacData 44 this.salt = ((ASN1OctetString)seq.getObjectAt(1)).getOctets(); in MacData() 58 byte[] salt, in MacData() argument 62 this.salt = salt; in MacData() 73 return salt; in getSalt() 97 v.add(new DEROctetString(salt)); in toASN1Primitive()
|
/external/openssl/crypto/asn1/ |
D | p5_pbe.c | 68 ASN1_SIMPLE(PBEPARAM, salt, ASN1_OCTET_STRING), 78 const unsigned char *salt, int saltlen) 99 if (!ASN1_STRING_set(pbe->salt, NULL, saltlen)) 104 sstr = ASN1_STRING_data(pbe->salt); 105 if (salt) 106 memcpy(sstr, salt, saltlen); 133 const unsigned char *salt, int saltlen) in PKCS5_pbe_set() argument 143 if (PKCS5_pbe_set0_algor(ret, alg, iter, salt, saltlen)) in PKCS5_pbe_set()
|
D | p5_pbev2.c | 75 ASN1_SIMPLE(PBKDF2PARAM, salt, ASN1_ANY), 90 unsigned char *salt, int saltlen, 158 pbe2->keyfunc = PKCS5_pbkdf2_set(iter, salt, saltlen, prf_nid, keylen); 195 unsigned char *salt, int saltlen) in PKCS5_pbe2_set() argument 197 return PKCS5_pbe2_set_iv(cipher, iter, salt, saltlen, NULL, -1); in PKCS5_pbe2_set() 200 X509_ALGOR *PKCS5_pbkdf2_set(int iter, unsigned char *salt, int saltlen, in PKCS5_pbkdf2_set() argument 212 kdf->salt->value.octet_string = osalt; in PKCS5_pbkdf2_set() 213 kdf->salt->type = V_ASN1_OCTET_STRING; in PKCS5_pbkdf2_set() 222 if (salt) in PKCS5_pbkdf2_set() 223 memcpy (osalt->data, salt, saltlen); in PKCS5_pbkdf2_set()
|
/external/dropbear/libtomcrypt/src/pk/pkcs1/ |
D | pkcs_1_pss_encode.c | 39 unsigned char *DB, *mask, *salt, *hash; in pkcs_1_pss_encode() local 67 salt = XMALLOC(modulus_len); in pkcs_1_pss_encode() 69 if (DB == NULL || mask == NULL || salt == NULL || hash == NULL) { in pkcs_1_pss_encode() 76 if (salt != NULL) { in pkcs_1_pss_encode() 77 XFREE(salt); in pkcs_1_pss_encode() 88 if (prng_descriptor[prng_idx].read(salt, saltlen, prng) != saltlen) { in pkcs_1_pss_encode() 105 if ((err = hash_descriptor[hash_idx].process(&md, salt, saltlen)) != CRYPT_OK) { in pkcs_1_pss_encode() 117 XMEMCPY(DB + x, salt, saltlen); in pkcs_1_pss_encode() 159 zeromem(salt, modulus_len); in pkcs_1_pss_encode() 164 XFREE(salt); in pkcs_1_pss_encode()
|
D | pkcs_1_pss_decode.c | 37 unsigned char *DB, *mask, *salt, *hash; in pkcs_1_pss_decode() local 65 salt = XMALLOC(modulus_len); in pkcs_1_pss_decode() 67 if (DB == NULL || mask == NULL || salt == NULL || hash == NULL) { in pkcs_1_pss_decode() 74 if (salt != NULL) { in pkcs_1_pss_decode() 75 XFREE(salt); in pkcs_1_pss_decode() 161 zeromem(salt, modulus_len); in pkcs_1_pss_decode() 166 XFREE(salt); in pkcs_1_pss_decode()
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jce/provider/ |
D | JDKKeyStore.java | 137 byte[] salt = new byte[KEY_SALT_SIZE]; in StoreEntry() 140 random.nextBytes(salt); in StoreEntry() 148 dOut.writeInt(salt.length); in StoreEntry() 149 dOut.write(salt); in StoreEntry() 152 … cipher = makePBECipher(KEY_CIPHER, Cipher.ENCRYPT_MODE, password, salt, iterationCount); in StoreEntry() 224 byte[] salt = new byte[dIn.readInt()]; in getObject() 226 dIn.readFully(salt); in getObject() 230 …ipher cipher = makePBECipher(KEY_CIPHER, Cipher.DECRYPT_MODE, password, salt, iterationCount); in getObject() 243 salt = new byte[dIn.readInt()]; in getObject() 245 dIn.readFully(salt); in getObject() [all …]
|
/external/openssl/crypto/evp/ |
D | p5_crpt2.c | 81 const unsigned char *salt, int saltlen, int iter, in PKCS5_PBKDF2_HMAC() argument 115 || !HMAC_Update(&hctx, salt, saltlen) in PKCS5_PBKDF2_HMAC() 139 h__dump (salt, saltlen); in PKCS5_PBKDF2_HMAC() 148 const unsigned char *salt, int saltlen, int iter, in PKCS5_PBKDF2_HMAC_SHA1() argument 151 return PKCS5_PBKDF2_HMAC(pass, passlen, salt, saltlen, iter, EVP_sha1(), in PKCS5_PBKDF2_HMAC_SHA1() 159 unsigned char salt[] = {0x12, 0x34, 0x56, 0x78}; in main() local 160 PKCS5_PBKDF2_HMAC_SHA1("password", -1, salt, 4, 5, 4, out); in main() 234 unsigned char *salt, key[EVP_MAX_KEY_LENGTH]; in PKCS5_v2_PBKDF2_keyivgen() local 295 if(kdf->salt->type != V_ASN1_OCTET_STRING) { in PKCS5_v2_PBKDF2_keyivgen() 302 salt = kdf->salt->value.octet_string->data; in PKCS5_v2_PBKDF2_keyivgen() [all …]
|
D | p5_crpt.c | 82 unsigned char *salt; in PKCS5_PBE_keyivgen() local 103 salt = pbe->salt->data; in PKCS5_PBE_keyivgen() 104 saltlen = pbe->salt->length; in PKCS5_PBE_keyivgen() 113 if (!EVP_DigestUpdate(&ctx, salt, saltlen)) in PKCS5_PBE_keyivgen()
|
/external/ganymed-ssh2/src/main/java/ch/ethz/ssh2/crypto/ |
D | PEMDecoder.java | 74 private static byte[] generateKeyFromPasswordSaltWithMD5(byte[] password, byte[] salt, int keyLen) in generateKeyFromPasswordSaltWithMD5() argument 77 if (salt.length < 8) in generateKeyFromPasswordSaltWithMD5() 88 md5.update(salt, 0, 8); // ARGH we only use the first 8 bytes of the salt in this step. in generateKeyFromPasswordSaltWithMD5() 236 byte[] salt = hexToByteArray(ps.dekInfo[1]); in decryptPEM() 243 des3.init(false, generateKeyFromPasswordSaltWithMD5(pw, salt, 24)); in decryptPEM() 244 bc = new CBCMode(des3, salt, false); in decryptPEM() 249 des.init(false, generateKeyFromPasswordSaltWithMD5(pw, salt, 8)); in decryptPEM() 250 bc = new CBCMode(des, salt, false); in decryptPEM() 255 aes.init(false, generateKeyFromPasswordSaltWithMD5(pw, salt, 16)); in decryptPEM() 256 bc = new CBCMode(aes, salt, false); in decryptPEM() [all …]
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/ |
D | PBEParametersGenerator.java | 11 protected byte[] salt; field in PBEParametersGenerator 31 byte[] salt, in init() argument 35 this.salt = salt; in init() 56 return salt; in getSalt()
|
/external/grub/stage2/ |
D | md5.c | 210 char *salt = crypted + 3; /* skip $1$ header */ in md5_password() local 224 saltlen = strstr (salt, "$") - salt; in md5_password() 228 char *end = strstr (salt, "$"); in md5_password() 229 if (end && end - salt < 8) in md5_password() 230 saltlen = end - salt; in md5_password() 234 salt[saltlen] = '$'; in md5_password() 239 md5_update (salt, saltlen); in md5_password() 268 md5_update (salt, saltlen); in md5_password() 280 p = salt + saltlen + 1; in md5_password()
|
/external/openssl/crypto/rsa/ |
D | rsa_pss.c | 201 unsigned char *H, *salt = NULL, *p; in RSA_padding_add_PKCS1_PSS_mgf1() local 242 salt = OPENSSL_malloc(sLen); in RSA_padding_add_PKCS1_PSS_mgf1() 243 if (!salt) in RSA_padding_add_PKCS1_PSS_mgf1() 248 if (RAND_bytes(salt, sLen) <= 0) in RSA_padding_add_PKCS1_PSS_mgf1() 258 if (sLen && !EVP_DigestUpdate(&ctx, salt, sLen)) in RSA_padding_add_PKCS1_PSS_mgf1() 279 *p++ ^= salt[i]; in RSA_padding_add_PKCS1_PSS_mgf1() 291 if (salt) in RSA_padding_add_PKCS1_PSS_mgf1() 292 OPENSSL_free(salt); in RSA_padding_add_PKCS1_PSS_mgf1()
|
/external/openssl/apps/ |
D | enc.c | 112 unsigned char salt[PKCS5_SALT_LEN]; in MAIN() local 524 if(!set_hex(hsalt,salt,sizeof salt)) { in MAIN() 529 } else if (RAND_pseudo_bytes(salt, sizeof salt) < 0) in MAIN() 536 (char *)salt, in MAIN() 537 sizeof salt) != sizeof salt)) { in MAIN() 543 (unsigned char *)salt, in MAIN() 544 sizeof salt) != sizeof salt) { in MAIN() 552 sptr = salt; in MAIN() 630 for (i=0; i<(int)sizeof(salt); i++) in MAIN() 631 printf("%02X",salt[i]); in MAIN()
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/generators/ |
D | OpenSSLPBEParametersGenerator.java | 41 byte[] salt) in init() argument 43 super.init(password, salt, 1); in init() 59 digest.update(salt, 0, salt.length); in generateDerivedKey()
|