/external/apache-harmony/crypto/src/test/api/java/org/apache/harmony/crypto/tests/javax/crypto/spec/ |
H A D | PBEParameterSpecTest.java | 38 * PBEParameterSpec(byte[] salt, int iterationCount) method testing. 43 byte[] salt = {1, 2, 3, 4, 5}; 49 + "in the case of null salt."); 53 PBEParameterSpec pbeps = new PBEParameterSpec(salt, iterationCount); 54 salt[0] ++; 55 assertFalse("The change of salt specified in the constructor " 57 salt[0] == pbeps.getSalt()[0]); 61 * getSalt() method testing. Tests that returned salt is equal 62 * to the salt specified in the constructor and that the change of 66 byte[] salt [all...] |
H A D | PBEKeySpecTest.java | 60 * PBEKeySpec(char[] password, byte[] salt, int iterationCount, int 67 byte[] salt = new byte[] {1, 2, 3, 4, 5}; 72 PBEKeySpec pbeks = new PBEKeySpec(null, salt, 85 + "in the case of null salt."); 94 + "in the case of empty salt."); 99 new PBEKeySpec(password, salt, -1, keyLength); 106 new PBEKeySpec(password, salt, iterationCount, -1); 113 new PBEKeySpec(password, salt, 0, keyLength); 120 new PBEKeySpec(password, salt, iterationCount, 0); 126 PBEKeySpec pbeks = new PBEKeySpec(password, salt, [all...] |
/external/bouncycastle/src/main/java/org/bouncycastle/asn1/pkcs/ |
H A D | PBEParameter.java | 18 ASN1OctetString salt; field in class:PBEParameter 21 byte[] salt, 24 if (salt.length != 8) 26 throw new IllegalArgumentException("salt length must be 8"); 28 this.salt = new DEROctetString(salt); 35 salt = (ASN1OctetString)seq.getObjectAt(0); 61 return salt.getOctets(); 68 v.add(salt); 20 PBEParameter( byte[] salt, int iterations) argument
|
H A D | MacData.java | 21 byte[] salt; field in class:MacData 44 this.salt = ((ASN1OctetString)seq.getObjectAt(1)).getOctets(); 58 byte[] salt, 62 this.salt = salt; 73 return salt; 97 v.add(new DEROctetString(salt)); 56 MacData( DigestInfo digInfo, byte[] salt, int iterationCount) argument
|
/external/openssh/openbsd-compat/ |
H A D | xcrypt.c | 61 xcrypt(const char *password, const char *salt) argument 66 if (is_md5_salt(salt)) 67 crypted = md5_crypt(password, salt); 69 crypted = crypt(password, salt); 72 crypted = bigcrypt(password, salt); 74 crypted = crypt(password, salt); 76 crypted = bigcrypt(password, salt); 78 crypted = crypt(password, salt);
|
H A D | port-uw.c | 56 char *salt; local 66 /* Encrypt the candidate password using the proper salt. */ 67 salt = (pw_password[0] && pw_password[1]) ? pw_password : "xx"; 75 result = ((strcmp(bigcrypt(password, salt), pw_password) == 0) 76 || (strcmp(osr5bigcrypt(password, salt), pw_password) == 0)); 80 result = (strcmp(xcrypt(password, salt), pw_password) == 0);
|
/external/bouncycastle/src/main/java/org/bouncycastle/crypto/ |
H A D | PBEParametersGenerator.java | 11 protected byte[] salt; field in class:PBEParametersGenerator 25 * @param salt the salt to be mixed with the password. 31 byte[] salt, 35 this.salt = salt; 50 * return the salt byte array. 52 * @return the salt byte array. 56 return salt; 29 init( byte[] password, byte[] salt, int iterationCount) argument
|
/external/openssl/crypto/asn1/ |
H A 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) 143 if (PKCS5_pbe_set0_algor(ret, alg, iter, salt, saltlen))
|
H A 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) 197 return PKCS5_pbe2_set_iv(cipher, iter, salt, saltlen, NULL, -1); 200 X509_ALGOR *PKCS5_pbkdf2_set(int iter, unsigned char *salt, int saltlen, 212 kdf->salt->value.octet_string = osalt; 213 kdf->salt->type = V_ASN1_OCTET_STRING; 222 if (salt) 223 memcpy (osalt->data, salt, saltle [all...] |
/external/openssl/crypto/pkcs12/ |
H A D | p12_crpt.c | 74 unsigned char *salt; local 93 salt = pbe->salt->data; 94 saltlen = pbe->salt->length; 95 if (!PKCS12_key_gen (pass, passlen, salt, saltlen, PKCS12_KEY_ID, 101 if (!PKCS12_key_gen (pass, passlen, salt, saltlen, PKCS12_IV_ID,
|
H A D | p12_mutl.c | 72 unsigned char key[EVP_MAX_MD_SIZE], *salt; local 82 salt = p12->mac->salt->data; 83 saltlen = p12->mac->salt->length; 94 if(!PKCS12_key_gen (pass, passlen, salt, saltlen, PKCS12_MAC_ID, iter, 133 unsigned char *salt, int saltlen, int iter, const EVP_MD *md_type) 139 if (PKCS12_setup_mac (p12, iter, salt, saltlen, md_type) == 156 int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt, int saltlen, argument 171 p12->mac->salt->length = saltlen; 172 if (!(p12->mac->salt 132 PKCS12_set_mac(PKCS12 *p12, const char *pass, int passlen, unsigned char *salt, int saltlen, int iter, const EVP_MD *md_type) argument [all...] |
H A D | p12_p8e.c | 65 unsigned char *salt, int saltlen, int iter, 76 if(pbe_nid == -1) pbe = PKCS5_pbe2_set(cipher, iter, salt, saltlen); 77 else pbe = PKCS5_pbe_set(pbe_nid, iter, salt, saltlen); 63 PKCS8_encrypt(int pbe_nid, const EVP_CIPHER *cipher, const char *pass, int passlen, unsigned char *salt, int saltlen, int iter, PKCS8_PRIV_KEY_INFO *p8inf) argument
|
/external/openssh/ |
H A D | auth2-jpake.c | 63 * anyway because they will mismatch on fake salt. 120 /* Returns 1 if 'c' is a valid crypt(3) salt character, 0 otherwise */ 134 * Derive fake salt as H(username || first_private_host_key) 185 /* ASCII an integer [0, 64) for inclusion in a password/salt */ 194 /* Generate ASCII salt bytes for user */ 216 * a stable fake salt under it for use by a non-existent account. 220 fake_salt_and_scheme(Authctxt *authctxt, char **salt, char **scheme) argument 240 xasprintf(salt, "$1$%s$", makesalt(8, authctxt->user)); 243 *salt = xstrdup(makesalt(2, authctxt->user)); 248 xasprintf(salt, " 272 auth2_jpake_get_pwdata(Authctxt *authctxt, BIGNUM **s, char **hash_scheme, char **salt) argument 377 char *salt, *hash_scheme; local [all...] |
/external/bouncycastle/src/main/java/org/bouncycastle/crypto/generators/ |
H A D | OpenSSLPBEParametersGenerator.java | 33 * @param salt salt to use. 37 byte[] salt) 39 super.init(password, salt, 1); 43 * the derived key function, the ith hash of the password and the salt. 55 digest.update(salt, 0, salt.length); 79 * Generate a key parameter derived from the password, salt, and iteration 98 * the password, salt, and iteration count we are currently initialised 120 * salt, an 35 init( byte[] password, byte[] salt) argument [all...] |
/external/dropbear/libtomcrypt/src/pk/pkcs1/ |
H A D | pkcs_1_pss_encode.c | 24 @param saltlen The length of the salt desired (octets) 39 unsigned char *DB, *mask, *salt, *hash; local 64 /* allocate ram for DB/mask/salt/hash of size modulus_len */ 67 salt = XMALLOC(modulus_len); 69 if (DB == NULL || mask == NULL || salt == NULL || hash == NULL) { 76 if (salt != NULL) { 77 XFREE(salt); 86 /* generate random salt */ 88 if (prng_descriptor[prng_idx].read(salt, saltlen, prng) != saltlen) { 94 /* M = (eight) 0x00 || msghash || salt, has [all...] |
H A D | pkcs_1_pss_decode.c | 26 @param saltlen The length of the salt used (octets) 37 unsigned char *DB, *mask, *salt, *hash; local 62 /* allocate ram for DB/mask/salt/hash of size modulus_len */ 65 salt = XMALLOC(modulus_len); 67 if (DB == NULL || mask == NULL || salt == NULL || hash == NULL) { 74 if (salt != NULL) { 75 XFREE(salt); 117 /* DB = PS || 0x01 || salt, PS == modulus_len - saltlen - hLen - 2 zero bytes */ 133 /* M = (eight) 0x00 || msghash || salt, mask = H(M) */ 161 zeromem(salt, modulus_le [all...] |
/external/openssl/crypto/des/ |
H A D | fcrypt.c | 27 /* Added more values to handle illegal salt values the way normal 61 char *DES_crypt(const char *buf, const char *salt) argument 66 return(DES_fcrypt(buf,salt,buff)); 72 /* Copy at most 2 chars of salt */ 73 if ((e_salt[0] = salt[0]) != '\0') 74 e_salt[1] = salt[1]; 99 char *DES_fcrypt(const char *buf, const char *salt, char *ret) argument 119 x=ret[0]=((salt[0] == '\0')?'A':salt[0]); 121 x=ret[1]=((salt[ [all...] |
/external/openssl/crypto/evp/ |
H A D | p5_crpt2.c | 81 const unsigned char *salt, int saltlen, int iter, 115 || !HMAC_Update(&hctx, salt, saltlen) 139 h__dump (salt, saltlen); 148 const unsigned char *salt, int saltlen, int iter, 151 return PKCS5_PBKDF2_HMAC(pass, passlen, salt, saltlen, iter, EVP_sha1(), 159 unsigned char salt[] = {0x12, 0x34, 0x56, 0x78}; local 160 PKCS5_PBKDF2_HMAC_SHA1("password", -1, salt, 4, 5, 4, out); 234 unsigned char *salt, key[EVP_MAX_KEY_LENGTH]; local 295 if(kdf->salt->type != V_ASN1_OCTET_STRING) { 302 salt 80 PKCS5_PBKDF2_HMAC(const char *pass, int passlen, const unsigned char *salt, int saltlen, int iter, const EVP_MD *digest, int keylen, unsigned char *out) argument 147 PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen, const unsigned char *salt, int saltlen, int iter, int keylen, unsigned char *out) argument [all...] |
H A D | p5_crpt.c | 82 unsigned char *salt; local 103 salt = pbe->salt->data; 104 saltlen = pbe->salt->length; 113 if (!EVP_DigestUpdate(&ctx, salt, saltlen))
|
/external/chromium/chrome/common/ |
H A D | visitedlink_common.cc | 79 const uint8 salt[LINK_SALT_LENGTH]) { 84 MD5Update(&ctx, salt, sizeof(salt)); 76 ComputeURLFingerprint( const char* canonical_url, size_t url_len, const uint8 salt[LINK_SALT_LENGTH]) argument
|
/external/dropbear/libtomcrypt/src/misc/pkcs5/ |
H A D | pkcs_5_1.c | 22 @param salt The salt (or nonce) which is 8 octets long 30 const unsigned char *salt, 40 LTC_ARGCHK(salt != NULL); 62 /* hash initial password + salt */ 69 if ((err = hash_descriptor[hash_idx].process(md, salt, 8)) != CRYPT_OK) { 29 pkcs_5_alg1(const unsigned char *password, unsigned long password_len, const unsigned char *salt, int iteration_count, int hash_idx, unsigned char *out, unsigned long *outlen) argument
|
H A D | pkcs_5_2.c | 23 @param salt The salt (or nonce) 24 @param salt_len The length of the salt (octets) 32 const unsigned char *salt, unsigned long salt_len, 43 LTC_ARGCHK(salt != NULL); 81 if ((err = hmac_process(hmac, salt, salt_len)) != CRYPT_OK) { 31 pkcs_5_alg2(const unsigned char *password, unsigned long password_len, const unsigned char *salt, unsigned long salt_len, int iteration_count, int hash_idx, unsigned char *out, unsigned long *outlen) argument
|
/external/bouncycastle/src/main/java/org/bouncycastle/openssl/ |
H A D | PEMUtilities.java | 81 static SecretKey generateSecretKeyForPKCS5Scheme2(String algorithm, char[] password, byte[] salt, int iterationCount) argument 87 salt, 196 byte[] salt = iv; 197 if (salt.length > 8) 199 salt = new byte[8]; 200 System.arraycopy(iv, 0, salt, 0, 8); 220 sKey = getKey(password, "AES", keyBits / 8, salt); 254 byte[] salt) 256 return getKey(password, algorithm, keyLength, salt, false); 263 byte[] salt, 250 getKey( char[] password, String algorithm, int keyLength, byte[] salt) argument 259 getKey( char[] password, String algorithm, int keyLength, byte[] salt, boolean des2) argument [all...] |
/external/ganymed-ssh2/src/main/java/ch/ethz/ssh2/crypto/ |
H A D | PEMDecoder.java | 74 private static byte[] generateKeyFromPasswordSaltWithMD5(byte[] password, byte[] salt, int keyLen) argument 77 if (salt.length < 8) 88 md5.update(salt, 0, 8); // ARGH we only use the first 8 bytes of the salt in this step. 230 throw new IOException("Broken PEM, no mode and salt given, but encryption enabled"); 236 byte[] salt = hexToByteArray(ps.dekInfo[1]); 243 des3.init(false, generateKeyFromPasswordSaltWithMD5(pw, salt, 24)); 244 bc = new CBCMode(des3, salt, false); 249 des.init(false, generateKeyFromPasswordSaltWithMD5(pw, salt, 8)); 250 bc = new CBCMode(des, salt, fals [all...] |
/external/chromium/crypto/ |
H A D | symmetric_key_openssl.cc | 45 const std::string& salt, 57 reinterpret_cast<const uint8*>(salt.data()), 58 salt.length(), iterations, 43 DeriveKeyFromPassword(Algorithm algorithm, const std::string& password, const std::string& salt, size_t iterations, size_t key_size_in_bits) argument
|