Searched refs:salt (Results 1 - 25 of 97) sorted by relevance

1234

/external/apache-harmony/crypto/src/test/api/java/org/apache/harmony/crypto/tests/javax/crypto/spec/
H A DPBEParameterSpecTest.java38 * 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 DPBEKeySpecTest.java60 * 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/bcprov/src/main/java/org/bouncycastle/asn1/pkcs/
H A DPBEParameter.java18 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 DMacData.java21 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
H A DPBKDF2Params.java39 byte[] salt,
42 this.octStr = new DEROctetString(salt);
47 byte[] salt,
51 this(salt, iterationCount);
38 PBKDF2Params( byte[] salt, int iterationCount) argument
46 PBKDF2Params( byte[] salt, int iterationCount, int keyLength) argument
/external/openssh/openbsd-compat/
H A Dxcrypt.c61 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 Dport-uw.c56 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/bcprov/src/main/java/org/bouncycastle/crypto/
H A DPBEParametersGenerator.java11 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 Dp5_pbe.c68 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 Dp5_pbev2.c75 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 Dp12_crpt.c74 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 Dp12_mutl.c72 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 Dp12_p8e.c65 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 Dauth2-jpake.c63 * 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/bcprov/src/main/java/org/bouncycastle/crypto/generators/
H A DOpenSSLPBEParametersGenerator.java37 * @param salt salt to use.
41 byte[] salt)
43 super.init(password, salt, 1);
47 * the derived key function, the ith hash of the password and the salt.
59 digest.update(salt, 0, salt.length);
83 * Generate a key parameter derived from the password, salt, and iteration
102 * the password, salt, and iteration count we are currently initialised
124 * salt, an
39 init( byte[] password, byte[] salt) argument
[all...]
/external/dropbear/libtomcrypt/src/pk/pkcs1/
H A Dpkcs_1_pss_encode.c24 @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 Dpkcs_1_pss_decode.c26 @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 Dfcrypt.c27 /* 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 Dp5_crpt2.c81 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 Dp5_crpt.c82 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 Dvisitedlink_common.cc79 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 Dpkcs_5_1.c22 @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 Dpkcs_5_2.c23 @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/ganymed-ssh2/src/main/java/ch/ethz/ssh2/crypto/
H A DPEMDecoder.java74 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 Dsymmetric_key_openssl.cc45 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

Completed in 318 milliseconds

1234