/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/chromium_org/third_party/openssl/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/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/chromium_org/third_party/tlslite/tlslite/ |
D | VerifierDB.py | 29 (N, g, salt, verifier) = valueStr.split(" ") 32 salt = base64ToString(salt) 34 return (N, g, salt, verifier) 55 N, g, salt, verifier = value 58 salt = stringToBase64(salt) 60 valueStr = " ".join( (N, g, salt, verifier) ) 64 (N, g, salt, verifier) = value 65 x = mathtls.makeX(salt, username, param)
|
/external/chromium_org/third_party/openssl/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/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/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/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()
|
/external/chromium_org/chrome/android/javatests/src/org/chromium/chrome/browser/identity/ |
D | SettingsSecureBasedIdentificationGeneratorTest.java | 22 String salt = "mySalt"; in testAndroidIdSuccessWithSalt() local 23 String expected = HashUtil.getMd5Hash(new HashUtil.Params(androidId).withSalt(salt)); in testAndroidIdSuccessWithSalt() 24 runTest(androidId, salt, expected); in testAndroidIdSuccessWithSalt() 39 String salt = "mySalt"; in testAndroidIdFailureWithSalt() local 41 runTest(androidId, salt, expected); in testAndroidIdFailureWithSalt() 48 String salt = null; in testAndroidIdFailureWithoutSalt() local 50 runTest(androidId, salt, expected); in testAndroidIdFailureWithoutSalt() 53 private void runTest(String androidId, String salt, String expectedUniqueId) { in runTest() argument 58 String result = generator.getUniqueId(salt); in runTest()
|
/external/chromium_org/third_party/openssl/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/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()
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/keystore/bc/ |
D | BcKeyStoreSpi.java | 136 byte[] salt = new byte[KEY_SALT_SIZE]; in StoreEntry() 139 random.nextBytes(salt); in StoreEntry() 147 dOut.writeInt(salt.length); in StoreEntry() 148 dOut.write(salt); in StoreEntry() 151 … cipher = makePBECipher(KEY_CIPHER, Cipher.ENCRYPT_MODE, password, salt, iterationCount); in StoreEntry() 223 byte[] salt = new byte[dIn.readInt()]; in getObject() 225 dIn.readFully(salt); in getObject() 229 …ipher cipher = makePBECipher(KEY_CIPHER, Cipher.DECRYPT_MODE, password, salt, iterationCount); in getObject() 242 salt = new byte[dIn.readInt()]; in getObject() 244 dIn.readFully(salt); in getObject() [all …]
|
/external/chromium_org/third_party/openssl/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 …]
|
/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 …]
|
/external/chromium_org/chrome/browser/renderer_host/pepper/ |
D | device_id_fetcher.cc | 118 std::string salt = profile->GetPrefs()->GetString(prefs::kDRMSalt); in CheckPrefsOnUIThread() local 119 if (salt.empty()) { in CheckPrefsOnUIThread() 123 salt = base::HexEncode(salt_bytes, arraysize(salt_bytes)); in CheckPrefsOnUIThread() 124 profile->GetPrefs()->SetString(prefs::kDRMSalt, salt); in CheckPrefsOnUIThread() 134 profile->GetPath(), salt)); in CheckPrefsOnUIThread() 138 this, salt)); in CheckPrefsOnUIThread() 142 void DeviceIDFetcher::ComputeOnUIThread(const std::string& salt, in ComputeOnUIThread() argument 155 if (!base::HexStringToBytes(salt, &salt_bytes)) in ComputeOnUIThread() 186 const std::string& salt) { in LegacyComputeOnBlockingPool() argument 203 this, salt))); in LegacyComputeOnBlockingPool()
|