/external/openssh/openbsd-compat/ |
D | xcrypt.c | 78 static char salt[32]; in pick_salt() local 80 if (salt[0] != '\0') in pick_salt() 81 return salt; in pick_salt() 82 strlcpy(salt, "xx", sizeof(salt)); in pick_salt() 88 strlcpy(salt, passwd, MIN(typelen, sizeof(salt))); in pick_salt() 95 return salt; in pick_salt() 99 xcrypt(const char *password, const char *salt) in xcrypt() argument 107 if (salt == NULL) in xcrypt() 108 salt = pick_salt(); in xcrypt() 111 if (is_md5_salt(salt)) in xcrypt() [all …]
|
/external/e2fsprogs/misc/ |
D | e4crypt.c | 180 struct salt { struct 181 unsigned char *salt; member 187 struct salt *salt_list; argument 192 static struct salt *find_by_salt(unsigned char *salt, size_t salt_len) in find_by_salt() argument 195 struct salt *p; in find_by_salt() 199 !memcmp(p->salt, salt, salt_len)) in find_by_salt() 204 static void add_salt(unsigned char *salt, size_t salt_len) in add_salt() argument 206 if (find_by_salt(salt, salt_len)) in add_salt() 210 salt_list = realloc(salt_list, max_salt * sizeof(struct salt)); in add_salt() 216 salt_list[num_salt].salt = salt; in add_salt() [all …]
|
/external/f2fs-tools/tools/ |
D | f2fscrypt.c | 227 struct salt { struct 228 unsigned char *salt; member 234 struct salt *salt_list; argument 239 static struct salt *find_by_salt(unsigned char *salt, size_t salt_len) in find_by_salt() argument 242 struct salt *p; in find_by_salt() 246 !memcmp(p->salt, salt, salt_len)) in find_by_salt() 251 static void add_salt(unsigned char *salt, size_t salt_len) in add_salt() argument 253 if (find_by_salt(salt, salt_len)) in add_salt() 257 salt_list = realloc(salt_list, max_salt * sizeof(struct salt)); in add_salt() 263 salt_list[num_salt].salt = salt; in add_salt() [all …]
|
/external/tensorflow/tensorflow/contrib/distributions/python/kernel_tests/ |
D | seed_stream_test.py | 34 strm = seed_stream.SeedStream(seed=4, salt="salt") 39 strm1 = seed_stream.SeedStream(seed=4, salt="salt") 40 strm2 = seed_stream.SeedStream(seed=4, salt="salt") 41 strm3 = seed_stream.SeedStream(seed=4, salt="salt") 47 strm1 = seed_stream.SeedStream(seed=4, salt="salt") 48 strm2 = seed_stream.SeedStream(seed=5, salt="salt") 53 strm1 = seed_stream.SeedStream(seed=4, salt="salt") 54 strm2 = seed_stream.SeedStream(seed=4, salt="another salt") 61 strm1 = seed_stream.SeedStream(seed=4, salt="salt") 62 strm2 = seed_stream.SeedStream(strm1(), salt="salt") [all …]
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/ |
D | PKCS12KeyWithParameters.java | 14 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/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/jcajce/ |
D | PKCS12KeyWithParameters.java | 16 private final byte[] salt; field in PKCS12KeyWithParameters 26 public PKCS12KeyWithParameters(char[] password, byte[] salt, int iterationCount) in PKCS12KeyWithParameters() argument 30 this.salt = Arrays.clone(salt); in PKCS12KeyWithParameters() 44 …hParameters(char[] password, boolean useWrongZeroLengthConversion, byte[] salt, int iterationCount) in PKCS12KeyWithParameters() argument 48 this.salt = Arrays.clone(salt); in PKCS12KeyWithParameters() 59 return salt; in getSalt()
|
/external/python/cpython3/Lib/test/ |
D | test_crypt.py | 21 salt = crypt.mksalt(method) 22 self.assertIn(len(salt) - method.salt_chars, {0, 1, 3, 4, 6, 7}) 24 self.assertIn(method.ident, salt[:len(salt)-method.salt_chars]) 48 salt = crypt.mksalt(method, rounds=rounds) 49 self.assertIn('$rounds=%d$' % rounds, salt) 50 self.assertEqual(len(salt) - method.salt_chars, 52 cr = crypt.crypt('mypassword', salt) 61 salt = crypt.mksalt(crypt.METHOD_BLOWFISH, rounds=1 << log_rounds) 62 self.assertIn('$%02d$' % log_rounds, salt) 63 self.assertIn(len(salt) - crypt.METHOD_BLOWFISH.salt_chars, {6, 7}) [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 | 22 byte[] salt; field in MacData 45 this.salt = Arrays.clone(ASN1OctetString.getInstance(seq.getObjectAt(1)).getOctets()); in MacData() 59 byte[] salt, in MacData() argument 63 this.salt = Arrays.clone(salt); in MacData() 74 return Arrays.clone(salt); in getSalt() 98 v.add(new DEROctetString(salt)); in toASN1Primitive()
|
D | PBKDF2Params.java | 69 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/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/provider/keystore/bc/ |
D | BcKeyStoreSpi.java | 146 byte[] salt = new byte[KEY_SALT_SIZE]; in StoreEntry() 149 random.nextBytes(salt); in StoreEntry() 157 dOut.writeInt(salt.length); in StoreEntry() 158 dOut.write(salt); in StoreEntry() 161 … cipher = makePBECipher(KEY_CIPHER, Cipher.ENCRYPT_MODE, password, salt, iterationCount); in StoreEntry() 233 byte[] salt = new byte[dIn.readInt()]; in getObject() 235 dIn.readFully(salt); in getObject() 239 …ipher cipher = makePBECipher(KEY_CIPHER, Cipher.DECRYPT_MODE, password, salt, iterationCount); in getObject() 252 salt = new byte[dIn.readInt()]; in getObject() 254 dIn.readFully(salt); in getObject() [all …]
|
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/asn1/pkcs/ |
D | PBEParameter.java | 22 ASN1OctetString salt; field in PBEParameter 25 byte[] salt, in PBEParameter() argument 28 if (salt.length != 8) in PBEParameter() 32 this.salt = new DEROctetString(salt); in PBEParameter() 39 salt = (ASN1OctetString)seq.getObjectAt(0); in PBEParameter() 65 return salt.getOctets(); in getSalt() 72 v.add(salt); in toASN1Primitive()
|
D | MacData.java | 26 byte[] salt; field in MacData 49 this.salt = Arrays.clone(ASN1OctetString.getInstance(seq.getObjectAt(1)).getOctets()); in MacData() 63 byte[] salt, in MacData() argument 67 this.salt = Arrays.clone(salt); in MacData() 78 return Arrays.clone(salt); in getSalt() 102 v.add(new DEROctetString(salt)); in toASN1Primitive()
|
D | PBKDF2Params.java | 71 byte[] salt, in PBKDF2Params() argument 74 this(salt, iterationCount, 0); in PBKDF2Params() 85 byte[] salt, in PBKDF2Params() argument 89 this(salt, iterationCount, keyLength, null); in PBKDF2Params() 101 byte[] salt, in PBKDF2Params() argument 106 this.octStr = new DEROctetString(Arrays.clone(salt)); in PBKDF2Params() 129 byte[] salt, in PBKDF2Params() argument 133 this(salt, iterationCount, 0, prf); in PBKDF2Params()
|
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/jcajce/provider/keystore/bc/ |
D | BcKeyStoreSpi.java | 150 byte[] salt = new byte[KEY_SALT_SIZE]; in StoreEntry() 153 random.nextBytes(salt); in StoreEntry() 161 dOut.writeInt(salt.length); in StoreEntry() 162 dOut.write(salt); in StoreEntry() 165 … cipher = makePBECipher(KEY_CIPHER, Cipher.ENCRYPT_MODE, password, salt, iterationCount); in StoreEntry() 237 byte[] salt = new byte[dIn.readInt()]; in getObject() 239 dIn.readFully(salt); in getObject() 243 …ipher cipher = makePBECipher(KEY_CIPHER, Cipher.DECRYPT_MODE, password, salt, iterationCount); in getObject() 256 salt = new byte[dIn.readInt()]; in getObject() 258 dIn.readFully(salt); in getObject() [all …]
|
/external/python/cpython3/Lib/ |
D | crypt.py | 60 def crypt(word, salt=None): argument 70 if salt is None or isinstance(salt, _Method): 71 salt = mksalt(salt) 72 return _crypt.crypt(word, salt) 81 salt = mksalt(method, rounds=rounds) 82 result = crypt('', salt)
|
/external/libbrillo/brillo/ |
D | cryptohome.cc | 42 static std::string* salt = nullptr; variable 45 if (salt && !salt->empty()) in EnsureSystemSaltIsLoaded() 66 if (!salt) in EnsureSystemSaltIsLoaded() 67 salt = new std::string(); in EnsureSystemSaltIsLoaded() 68 salt->assign(buf.data(), file_size); in EnsureSystemSaltIsLoaded() 82 SHA1_Update(&ctx, salt->data(), salt->size()); in SanitizeUserName() 156 return salt; in GetSystemSalt() 160 salt = value; in SetSystemSalt()
|
/external/python/cpython3/Doc/library/ |
D | crypt.rst | 43 A Modular Crypt Format method with 16 character salt and 86 character 48 Another Modular Crypt Format method with 16 character salt and 43 53 Another Modular Crypt Format method with 22 character salt and 31 60 Another Modular Crypt Format method with 8 character salt and 22 65 The traditional method with a 2 character salt and 13 characters of 86 .. function:: crypt(word, salt=None) 89 interface. The optional *salt* is either a string as returned from 92 including salt, as returned by this function. If *salt* is not 100 *salt* (either a random 2 or 16 character string, possibly prefixed with 102 encryption algorithm. The characters in *salt* must be in the set [all …]
|
/external/boringssl/src/crypto/pkcs8/ |
D | pkcs8.c | 109 int pkcs12_key_gen(const char *pass, size_t pass_len, const uint8_t *salt, in pkcs12_key_gen() argument 170 I[i] = salt[i % salt_len]; in pkcs12_key_gen() 236 const uint8_t *salt, size_t salt_len, in pkcs12_pbe_cipher_init() argument 243 if (!pkcs12_key_gen(pass, pass_len, salt, salt_len, PKCS12_KEY_ID, iterations, in pkcs12_pbe_cipher_init() 245 !pkcs12_key_gen(pass, pass_len, salt, salt_len, PKCS12_IV_ID, iterations, in pkcs12_pbe_cipher_init() 260 CBS pbe_param, salt; in pkcs12_pbe_decrypt_init() local 263 !CBS_get_asn1(&pbe_param, &salt, CBS_ASN1_OCTETSTRING) || in pkcs12_pbe_decrypt_init() 277 pass_len, CBS_data(&salt), CBS_len(&salt), in pkcs12_pbe_decrypt_init() 335 size_t pass_len, const uint8_t *salt, in pkcs12_pbe_encrypt_init() argument 350 !CBB_add_bytes(&salt_cbb, salt, salt_len) || in pkcs12_pbe_encrypt_init() [all …]
|
/external/toybox/toys/other/ |
D | mkpasswd.c | 34 char salt[MAX_SALT_LEN] = {0,}; in mkpasswd_main() local 43 if (-1 == (i = get_salt(salt, TT.m))) error_exit("bad -m"); in mkpasswd_main() 51 snprintf(salt+i, sizeof(salt)-i, "%s", TT.S); in mkpasswd_main() 76 xprintf("%s\n",crypt(*toys.optargs ? *toys.optargs : toybuf, salt)); in mkpasswd_main()
|
/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/python/cpython3/Modules/_blake2/clinic/ |
D | blake2b_impl.c.h | 15 Py_buffer *key, Py_buffer *salt, Py_buffer *person, 29 Py_buffer salt = {NULL, NULL}; in py_blake2b_new() local 40 …&data, &digest_size, &key, &salt, &person, &fanout, &depth, &leaf_size_obj, &node_offset_obj, &nod… in py_blake2b_new() 43 …return_value = py_blake2b_new_impl(type, data, digest_size, &key, &salt, &person, fanout, depth, l… in py_blake2b_new() 51 if (salt.obj) { in py_blake2b_new() 52 PyBuffer_Release(&salt); in py_blake2b_new()
|
D | blake2s_impl.c.h | 15 Py_buffer *key, Py_buffer *salt, Py_buffer *person, 29 Py_buffer salt = {NULL, NULL}; in py_blake2s_new() local 40 …&data, &digest_size, &key, &salt, &person, &fanout, &depth, &leaf_size_obj, &node_offset_obj, &nod… in py_blake2s_new() 43 …return_value = py_blake2s_new_impl(type, data, digest_size, &key, &salt, &person, fanout, depth, l… in py_blake2s_new() 51 if (salt.obj) { in py_blake2s_new() 52 PyBuffer_Release(&salt); in py_blake2s_new()
|
/external/python/cpython3/Modules/clinic/ |
D | _hashopenssl.c.h | 18 _hashlib_scrypt_impl(PyObject *module, Py_buffer *password, Py_buffer *salt, 29 Py_buffer salt = {NULL, NULL}; in _hashlib_scrypt() local 37 …&password, &salt, &PyLong_Type, &n_obj, &PyLong_Type, &r_obj, &PyLong_Type, &p_obj, &maxmem, &dkle… in _hashlib_scrypt() 40 … return_value = _hashlib_scrypt_impl(module, &password, &salt, n_obj, r_obj, p_obj, maxmem, dklen); in _hashlib_scrypt() 48 if (salt.obj) { in _hashlib_scrypt() 49 PyBuffer_Release(&salt); in _hashlib_scrypt()
|
/external/bouncycastle/repackaged/bcprov/src/main/java/com/android/org/bouncycastle/crypto/ |
D | PBEParametersGenerator.java | 14 protected byte[] salt; field in PBEParametersGenerator 35 byte[] salt, in init() argument 39 this.salt = salt; in init() 60 return salt; in getSalt()
|