/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/e2fsprogs/misc/ |
D | e4crypt.c | 180 struct salt { struct 181 unsigned char *salt; argument 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/toybox/toys/other/ |
D | mkpasswd.c | 30 char *salt; 35 char salt[MAX_SALT_LEN] = {0,}; local 40 if (TT.salt) error_exit("duplicate salt"); 41 TT.salt = toys.optargs[1]; 44 if (-1 == (i = get_salt(salt, TT.method))) error_exit("bad -m"); 45 if (TT.salt) { 46 char *s = TT.salt; 52 snprintf(salt+i, sizeof(salt)-i, "%s", TT.salt); 77 xprintf("%s\n",crypt(*toys.optargs ? *toys.optargs : toybuf, salt));
|
/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/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/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)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/libbrillo/brillo/ |
D | cryptohome.cc | 31 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/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 8 character salt and 22 58 The traditional method with a 2 character salt and 13 characters of 79 .. function:: crypt(word, salt=None) 82 interface. The optional *salt* is either a string as returned from 85 including salt, as returned by this function. If *salt* is not 93 *salt* (either a random 2 or 16 character string, possibly prefixed with 95 encryption algorithm. The characters in *salt* must be in the set 100 characters from the same alphabet as the salt. [all …]
|
/external/boringssl/src/crypto/pkcs8/ |
D | pkcs8.c | 99 int pkcs12_key_gen(const char *pass, size_t pass_len, const uint8_t *salt, in pkcs12_key_gen() argument 160 I[i] = salt[i % salt_len]; in pkcs12_key_gen() 226 const uint8_t *salt, size_t salt_len, in pkcs12_pbe_cipher_init() argument 233 if (!pkcs12_key_gen(pass, pass_len, salt, salt_len, PKCS12_KEY_ID, iterations, in pkcs12_pbe_cipher_init() 235 !pkcs12_key_gen(pass, pass_len, salt, salt_len, PKCS12_IV_ID, iterations, in pkcs12_pbe_cipher_init() 250 CBS pbe_param, salt; in pkcs12_pbe_decrypt_init() local 253 !CBS_get_asn1(&pbe_param, &salt, CBS_ASN1_OCTETSTRING) || in pkcs12_pbe_decrypt_init() 267 pass_len, CBS_data(&salt), CBS_len(&salt), in pkcs12_pbe_decrypt_init() 322 size_t pass_len, const uint8_t *salt, in pkcs12_pbe_encrypt_init() argument 337 !CBB_add_bytes(&salt_cbb, salt, salt_len) || in pkcs12_pbe_encrypt_init() [all …]
|
D | p5_pbev2.c | 144 size_t pass_len, const uint8_t *salt, in pkcs5_pbe2_cipher_init() argument 153 int ret = PKCS5_PBKDF2_HMAC_SHA1(pass, pass_len, salt, salt_len, iterations, in pkcs5_pbe2_cipher_init() 163 const uint8_t *salt, size_t salt_len) { in PKCS5_pbe2_encrypt_init() argument 188 !CBB_add_bytes(&salt_cbb, salt, salt_len) || in PKCS5_pbe2_encrypt_init() 204 return pkcs5_pbe2_cipher_init(ctx, cipher, iterations, pass, pass_len, salt, in PKCS5_pbe2_encrypt_init() 237 CBS pbkdf2_params, salt; in PKCS5_pbe2_decrypt_init() local 241 !CBS_get_asn1(&pbkdf2_params, &salt, CBS_ASN1_OCTETSTRING) || in PKCS5_pbe2_decrypt_init() 305 pass_len, CBS_data(&salt), CBS_len(&salt), in PKCS5_pbe2_decrypt_init()
|
/external/python/cpython3/Lib/ |
D | crypt.py | 35 def crypt(word, salt=None): argument 45 if salt is None or isinstance(salt, _Method): 46 salt = mksalt(salt) 47 return _crypt.crypt(word, salt)
|
/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()
|
D | _cryptmodule.c.h | 20 crypt_crypt_impl(PyObject *module, const char *word, const char *salt); 27 const char *salt; in crypt_crypt() local 30 &word, &salt)) { in crypt_crypt() 33 return_value = crypt_crypt_impl(module, word, salt); in crypt_crypt()
|
/external/syslinux/utils/ |
D | md5pass | 27 ($pass, $salt) = @ARGV; 29 unless (defined($salt)) { 30 $salt = MIME::Base64::encode(random_bytes(6), ''); 31 $salt =~ tr/\+/./; # . not + 34 print unix_md5_crypt($pass, $salt), "\n";
|
D | sha1pass | 27 ($pass, $salt) = @ARGV; 29 unless (defined($salt)) { 30 $salt = MIME::Base64::encode(random_bytes(6), ''); 32 $pass = Digest::SHA1::sha1_base64($salt, $pass); 34 print '$4$', $salt, '$', $pass, "\$\n";
|
/external/syslinux/com32/libutil/ |
D | sha256crypt.c | 291 static char *sha256_crypt_r(const char *key, const char *salt, char *buffer, in sha256_crypt_r() argument 314 if (strncmp(sha256_salt_prefix, salt, sizeof(sha256_salt_prefix) - 1) == 0) in sha256_crypt_r() 316 salt += sizeof(sha256_salt_prefix) - 1; in sha256_crypt_r() 318 if (strncmp(salt, sha256_rounds_prefix, sizeof(sha256_rounds_prefix) - 1) in sha256_crypt_r() 320 const char *num = salt + sizeof(sha256_rounds_prefix) - 1; in sha256_crypt_r() 324 salt = endp + 1; in sha256_crypt_r() 330 salt_len = MIN(strcspn(salt, "$"), SALT_LEN_MAX); in sha256_crypt_r() 340 if ((salt - (char *)0) % __alignof__(uint32_t) != 0) { in sha256_crypt_r() 342 salt = copied_salt = memcpy(tmp + __alignof__(uint32_t) in sha256_crypt_r() 344 salt, salt_len); in sha256_crypt_r() [all …]
|
D | sha512crypt.c | 326 static char *sha512_crypt_r(const char *key, const char *salt, char *buffer, in sha512_crypt_r() argument 349 if (strncmp(sha512_salt_prefix, salt, sizeof(sha512_salt_prefix) - 1) == 0) in sha512_crypt_r() 351 salt += sizeof(sha512_salt_prefix) - 1; in sha512_crypt_r() 353 if (strncmp(salt, sha512_rounds_prefix, sizeof(sha512_rounds_prefix) - 1) in sha512_crypt_r() 355 const char *num = salt + sizeof(sha512_rounds_prefix) - 1; in sha512_crypt_r() 359 salt = endp + 1; in sha512_crypt_r() 365 salt_len = MIN(strcspn(salt, "$"), SALT_LEN_MAX); in sha512_crypt_r() 375 if ((salt - (char *)0) % __alignof__(uint64_t) != 0) { in sha512_crypt_r() 377 salt = copied_salt = memcpy(tmp + __alignof__(uint64_t) in sha512_crypt_r() 379 salt, salt_len); in sha512_crypt_r() [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/python/cpython3/Modules/_blake2/clinic/ |
D | blake2s_impl.c.h | 16 Py_buffer *key, Py_buffer *salt, Py_buffer *person, 30 Py_buffer salt = {NULL, NULL}; in py_blake2s_new() local 41 …&data, &digest_size, &key, &salt, &person, &fanout, &depth, &leaf_size_obj, &node_offset_obj, &nod… in py_blake2s_new() 44 …return_value = py_blake2s_new_impl(type, data, digest_size, &key, &salt, &person, fanout, depth, l… in py_blake2s_new() 52 if (salt.obj) { in py_blake2s_new() 53 PyBuffer_Release(&salt); in py_blake2s_new()
|
D | blake2b_impl.c.h | 16 Py_buffer *key, Py_buffer *salt, Py_buffer *person, 30 Py_buffer salt = {NULL, NULL}; in py_blake2b_new() local 41 …&data, &digest_size, &key, &salt, &person, &fanout, &depth, &leaf_size_obj, &node_offset_obj, &nod… in py_blake2b_new() 44 …return_value = py_blake2b_new_impl(type, data, digest_size, &key, &salt, &person, fanout, depth, l… in py_blake2b_new() 52 if (salt.obj) { in py_blake2b_new() 53 PyBuffer_Release(&salt); in py_blake2b_new()
|
/external/python/cpython2/Doc/library/ |
D | crypt.rst | 31 .. function:: crypt(word, salt) 34 interface. *salt* is usually a random two-character string which will be used 35 to perturb the DES algorithm in one of 4096 ways. The characters in *salt* must 37 will be composed of characters from the same alphabet as the salt (the first two 38 characters represent the salt itself). 43 different sizes in the *salt*, it is recommended to use the full crypted 44 password as salt when checking for a password.
|
/external/python/cpython3/Lib/test/ |
D | test_hashlib.py | 507 constructor(salt=b'a' * i) 508 salt = b'a' * (salt_size + 1) 509 self.assertRaises(ValueError, constructor, salt=salt) 566 salt=b'', 839 password, salt, rounds, dklen = vector 843 out = pbkdf2(digest_name, password, salt, rounds, dklen) 845 (digest_name, password, salt, rounds, dklen)) 847 memoryview(salt), rounds, dklen) 849 bytearray(salt), rounds, dklen) 852 out = pbkdf2(digest_name, password, salt, rounds) [all …]
|
/external/boringssl/src/ssl/test/runner/ |
D | hkdf.go | 23 func hkdfExtract(hash func() hash.Hash, salt, ikm []byte) []byte { argument 24 if salt == nil { 25 salt = make([]byte, hash().Size()) 27 hmac := hmac.New(hash, salt)
|