/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 …]
|
D | port-uw.c | 57 char *salt; in sys_auth_passwd() local 68 salt = (pw_password[0] && pw_password[1]) ? pw_password : "xx"; in sys_auth_passwd() 76 result = ((strcmp(bigcrypt(password, salt), pw_password) == 0) in sys_auth_passwd() 77 || (strcmp(osr5bigcrypt(password, salt), pw_password) == 0)); in sys_auth_passwd() 81 result = (strcmp(xcrypt(password, salt), pw_password) == 0); in sys_auth_passwd()
|
/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; argument 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/python/cryptography/tests/hazmat/primitives/ |
D | test_scrypt.py | 53 salt = params["salt"] 56 scrypt = Scrypt(salt, length, work_factor, block_size, 65 salt = b"NaCl" 69 Scrypt(salt, length, work_factor, block_size, 77 salt = 1 80 Scrypt(salt, length, work_factor, block_size, 89 salt = b"NaCl" 91 scrypt = Scrypt(salt, length, work_factor, block_size, 103 salt = b"NaCl" 105 scrypt = Scrypt(salt, length, work_factor, block_size, [all …]
|
D | test_hkdf.py | 33 salt=None, 42 salt=None, 55 salt=None, 68 salt=None, 77 salt=None, 88 salt=None, 101 salt=u"foo", 110 salt=None, 119 salt=None, 130 salt=None, [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/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/python/cpython3/Lib/test/ |
D | test_crypt.py | 37 salt = crypt.mksalt(method) 38 self.assertIn(len(salt) - method.salt_chars, {0, 1, 3, 4, 6, 7}) 40 self.assertIn(method.ident, salt[:len(salt)-method.salt_chars]) 68 salt = crypt.mksalt(method, rounds=rounds) 69 self.assertIn('$rounds=%d$' % rounds, salt) 70 self.assertEqual(len(salt) - method.salt_chars, 72 cr = crypt.crypt('mypassword', salt) 82 salt = crypt.mksalt(crypt.METHOD_BLOWFISH, rounds=1 << log_rounds) 83 self.assertIn('$%02d$' % log_rounds, salt) 84 self.assertIn(len(salt) - crypt.METHOD_BLOWFISH.salt_chars, {6, 7}) [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/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/python/cpython3/Lib/ |
D | crypt.py | 69 def crypt(word, salt=None): argument 79 if salt is None or isinstance(salt, _Method): 80 salt = mksalt(salt) 81 return _crypt.crypt(word, salt) 90 salt = mksalt(method, rounds=rounds) 91 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/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/Modules/clinic/ |
D | _cryptmodule.c.h | 20 crypt_crypt_impl(PyObject *module, const char *word, const char *salt); 27 const char *salt; in crypt_crypt() local 50 salt = PyUnicode_AsUTF8AndSize(args[1], &salt_length); in crypt_crypt() 51 if (salt == NULL) { in crypt_crypt() 54 if (strlen(salt) != (size_t)salt_length) { in crypt_crypt() 58 return_value = crypt_crypt_impl(module, word, salt); in crypt_crypt()
|
/external/python/cryptography/vectors/cryptography_vectors/KDF/ |
D | rfc-5869-HKDF-SHA1.txt | 8 salt = 000102030405060708090a0b0c 22 salt = 606162636465666768696a6b6c6d6e6f707172737475767778797a7b7c7d7e7f808182838485868788898a8b8c8d… 30 # Test with SHA-1 and zero-length salt/info 36 salt = 44 # Test with SHA-1, salt not provided (defaults to HashLen zero octets), 51 salt =
|
/external/python/cpython3/Doc/library/ |
D | crypt.rst | 45 A Modular Crypt Format method with 16 character salt and 86 character 50 Another Modular Crypt Format method with 16 character salt and 43 55 Another Modular Crypt Format method with 22 character salt and 31 62 Another Modular Crypt Format method with 8 character salt and 22 67 The traditional method with a 2 character salt and 13 characters of 88 .. function:: crypt(word, salt=None) 91 interface. The optional *salt* is either a string as returned from 94 including salt, as returned by this function. If *salt* is not 102 *salt* (either a random 2 or 16 character string, possibly prefixed with 104 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/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/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()
|