Home
last modified time | relevance | path

Searched refs:salt (Results 1 – 25 of 113) sorted by relevance

12345

/external/apache-harmony/crypto/src/test/api/java/org/apache/harmony/crypto/tests/javax/crypto/spec/
DPBEKeySpecTest.java67 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 …]
DPBEParameterSpecTest.java43 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-trace/catapult/telemetry/third_party/webpagereplay/third_party/dns/rdtypes/ANY/
DNSEC3PARAM.py36 def __init__(self, rdclass, rdtype, algorithm, flags, iterations, salt): argument
41 self.salt = salt
44 if self.salt == '':
45 salt = '-'
47 salt = self.salt.encode('hex-codec')
48 return '%u %u %u %s' % (self.algorithm, self.flags, self.iterations, salt)
54 salt = tok.get_string()
55 if salt == '-':
56 salt = ''
58 salt = salt.decode('hex-codec')
[all …]
DNSEC3.py54 def __init__(self, rdclass, rdtype, algorithm, flags, iterations, salt, argument
60 self.salt = salt
66 if self.salt == '':
67 salt = '-'
69 salt = self.salt.encode('hex-codec')
81 salt, next, text)
87 salt = tok.get_string()
88 if salt == '-':
89 salt = ''
91 salt = salt.decode('hex-codec')
[all …]
/external/toybox/toys/other/
Dmkpasswd.c29 char *salt;
34 char salt[MAX_SALT_LEN] = {0,}; local
39 if (TT.salt) error_exit("duplicate salt");
40 TT.salt = toys.optargs[1];
43 if (-1 == (i = get_salt(salt, TT.method))) error_exit("bad -m");
44 if (TT.salt) {
45 char *s = TT.salt;
51 snprintf(salt+i, sizeof(salt)-i, "%s", TT.salt);
76 xprintf("%s\n",crypt(*toys.optargs ? *toys.optargs : toybuf, salt));
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/
DPKCS12KeyWithParameters.java14 private final byte[] salt; field in PKCS12KeyWithParameters
24 public PKCS12KeyWithParameters(char[] password, byte[] salt, int iterationCount) in PKCS12KeyWithParameters() argument
28 this.salt = Arrays.clone(salt); in PKCS12KeyWithParameters()
42 …hParameters(char[] password, boolean useWrongZeroLengthConversion, byte[] salt, int iterationCount) in PKCS12KeyWithParameters() argument
46 this.salt = Arrays.clone(salt); in PKCS12KeyWithParameters()
57 return salt; in getSalt()
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/asn1/pkcs/
DPBEParameter.java18 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()
DMacData.java21 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()
DPBKDF2Params.java69 byte[] salt, in PBKDF2Params() argument
72 this(salt, iterationCount, 0); in PBKDF2Params()
83 byte[] salt, in PBKDF2Params() argument
87 this(salt, iterationCount, keyLength, null); in PBKDF2Params()
99 byte[] salt, in PBKDF2Params() argument
104 this.octStr = new DEROctetString(Arrays.clone(salt)); in PBKDF2Params()
127 byte[] salt, in PBKDF2Params() argument
131 this(salt, iterationCount, 0, prf); in PBKDF2Params()
/external/boringssl/src/crypto/pkcs8/
Dp5_pbe.c70 ASN1_SIMPLE(PBEPARAM, salt, ASN1_OCTET_STRING),
80 const unsigned char *salt, int saltlen)
101 if (!ASN1_STRING_set(pbe->salt, NULL, saltlen))
106 sstr = ASN1_STRING_data(pbe->salt);
107 if (salt)
108 memcpy(sstr, salt, saltlen);
135 const unsigned char *salt, int saltlen) in PKCS5_pbe_set() argument
145 if (PKCS5_pbe_set0_algor(ret, alg, iter, salt, saltlen)) in PKCS5_pbe_set()
Dp5_pbev2.c81 ASN1_SIMPLE(PBKDF2PARAM, salt, ASN1_ANY),
117 unsigned char *salt, int saltlen, in PKCS5_pbe2_set_iv() argument
183 pbe2->keyfunc = PKCS5_pbkdf2_set(iter, salt, saltlen, prf_nid, keylen); in PKCS5_pbe2_set_iv()
220 unsigned char *salt, int saltlen) in PKCS5_pbe2_set() argument
222 return PKCS5_pbe2_set_iv(cipher, iter, salt, saltlen, NULL, -1); in PKCS5_pbe2_set()
225 X509_ALGOR *PKCS5_pbkdf2_set(int iter, unsigned char *salt, int saltlen, in PKCS5_pbkdf2_set() argument
237 kdf->salt->value.octet_string = osalt; in PKCS5_pbkdf2_set()
238 kdf->salt->type = V_ASN1_OCTET_STRING; in PKCS5_pbkdf2_set()
247 if (salt) in PKCS5_pbkdf2_set()
248 memcpy (osalt->data, salt, saltlen); in PKCS5_pbkdf2_set()
[all …]
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/keystore/bc/
DBcKeyStoreSpi.java142 byte[] salt = new byte[KEY_SALT_SIZE]; in StoreEntry()
145 random.nextBytes(salt); in StoreEntry()
153 dOut.writeInt(salt.length); in StoreEntry()
154 dOut.write(salt); in StoreEntry()
157 … cipher = makePBECipher(KEY_CIPHER, Cipher.ENCRYPT_MODE, password, salt, iterationCount); in StoreEntry()
229 byte[] salt = new byte[dIn.readInt()]; in getObject()
231 dIn.readFully(salt); in getObject()
235 …ipher cipher = makePBECipher(KEY_CIPHER, Cipher.DECRYPT_MODE, password, salt, iterationCount); in getObject()
248 salt = new byte[dIn.readInt()]; in getObject()
250 dIn.readFully(salt); in getObject()
[all …]
/external/avahi/avahi-compat-howl/
DMakefile.am32 avahi_compat_howl_saltdir=$(avahi_compat_howldir)/salt
54 include/salt/socket.h \
55 include/salt/address.h \
56 include/salt/platform.h \
57 include/salt/signal.h \
58 include/salt/interface.h \
59 include/salt/salt.h \
60 include/salt/time.h \
61 include/salt/debug.h
/external/libbrillo/brillo/
Dcryptohome.cc31 static std::string* salt = nullptr; variable
34 if (salt && !salt->empty()) in EnsureSystemSaltIsLoaded()
55 if (!salt) in EnsureSystemSaltIsLoaded()
56 salt = new std::string(); in EnsureSystemSaltIsLoaded()
57 salt->assign(buf.data(), file_size); in EnsureSystemSaltIsLoaded()
71 SHA1_Update(&ctx, salt->data(), salt->size()); in SanitizeUserName()
133 return salt; in GetSystemSalt()
137 salt = value; in SetSystemSalt()
/external/chromium-trace/catapult/third_party/webapp2/webapp2_extras/
Dsecurity.py123 salt = method != 'plain' and generate_random_string(length) or ''
124 hashval = hash_password(password, method, salt, pepper)
128 return '%s$%s$%s' % (hashval, method, salt)
151 hashval, method, salt = pwhash.split('$', 2)
152 return hash_password(password, method, salt, pepper) == hashval
155 def hash_password(password, method, salt=None, pepper=None): argument
182 if salt:
183 h = hmac.new(webapp2._to_utf8(salt), password, method)
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/
DPBEParametersGenerator.java11 protected byte[] salt; field in PBEParametersGenerator
31 byte[] salt, in init() argument
35 this.salt = salt; in init()
56 return salt; in getSalt()
/external/jetty/src/java/org/eclipse/jetty/util/security/
DUnixCrypt.java328 private static long des_cipher(long in, int salt, int num_iter, long[] KS) in des_cipher() argument
330 salt = to_six_bit(salt); in des_cipher()
349 k = ((R >> 32) ^ R) & salt & 0xffffffffL; in des_cipher()
361 k = ((L >> 32) ^ L) & salt & 0xffffffffL; in des_cipher()
429 int salt = 0; in crypt() local
434 salt = (salt << 6) | (0x00ff & A64TOI[c]); in crypt()
437 long rsltblock = des_cipher(constdatablock, salt, 25, KS); in crypt()
/external/wpa_supplicant_8/src/tls/
Dpkcs5.c26 u8 salt[64]; member
179 hdr.length > sizeof(params->salt)) { in pkcs5_get_params_pbes2()
186 os_memcpy(params->salt, hdr.payload, hdr.length); in pkcs5_get_params_pbes2()
188 wpa_hexdump(MSG_DEBUG, "PKCS #5: salt", params->salt, params->salt_len); in pkcs5_get_params_pbes2()
340 hdr.length > sizeof(params->salt)) { in pkcs5_get_params()
347 os_memcpy(params->salt, hdr.payload, hdr.length); in pkcs5_get_params()
350 params->salt, params->salt_len); in pkcs5_get_params()
395 params->salt, params->salt_len); in pkcs5_crypto_init_pbes2()
398 if (pbkdf2_sha1(passwd, params->salt, params->salt_len, in pkcs5_crypto_init_pbes2()
422 static int pkcs12_key_gen(const u8 *pw, size_t pw_len, const u8 *salt, in pkcs12_key_gen() argument
[all …]
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/generators/
DOpenSSLPBEParametersGenerator.java41 byte[] salt) in init() argument
43 super.init(password, salt, 1); in init()
59 digest.update(salt, 0, salt.length); in generateDerivedKey()
DPKCS12ParametersGenerator.java91 if ((salt != null) && (salt.length != 0)) in generateDerivedKey()
93 S = new byte[v * ((salt.length + v - 1) / v)]; in generateDerivedKey()
97 S[i] = salt[i % salt.length]; in generateDerivedKey()
/external/tpm2/
DStartAuthSession.c38 TPM2B_DATA salt; in TPM2_StartAuthSession() local
71 &in->encryptedSalt, &salt); in TPM2_StartAuthSession()
81 salt.t.size = 0; in TPM2_StartAuthSession()
106 in->bind, &salt, &out->sessionHandle); in TPM2_StartAuthSession()
/external/boringssl/src/crypto/evp/
Dpbkdf.c64 const uint8_t *salt, size_t salt_len, unsigned iterations, in PKCS5_PBKDF2_HMAC() argument
96 if (!HMAC_Update(&hctx, salt, salt_len) || in PKCS5_PBKDF2_HMAC()
146 const uint8_t *salt, size_t salt_len, in PKCS5_PBKDF2_HMAC_SHA1() argument
149 return PKCS5_PBKDF2_HMAC(password, password_len, salt, salt_len, iterations, in PKCS5_PBKDF2_HMAC_SHA1()
/external/scrypt/tests/
Dscrypt_test.cpp33 const char *pw, *salt; member
70 crypto_scrypt((const uint8_t*) s.pw, strlen(s.pw), (const uint8_t*) s.salt, in TEST_F()
71 strlen(s.salt), s.Nfactor, s.rfactor, s.pfactor, output, sizeof(output))) in TEST_F()
/external/libchrome/crypto/
Dsymmetric_key_nss.cc47 const std::string& salt, in DeriveKeyFromPassword() argument
51 if (salt.empty() || iterations == 0 || key_size_in_bits == 0) in DeriveKeyFromPassword()
71 const_cast<char *>(salt.data())); in DeriveKeyFromPassword()
72 salt_item.len = salt.size(); in DeriveKeyFromPassword()
/external/avahi/avahi-compat-howl/include/salt/
Dsalt.h61 sw_salt salt,
71 sw_salt salt,
80 sw_salt salt,
88 sw_salt salt,

12345