/device/linaro/bootloader/edk2/AppPkg/Applications/Python/Python-2.7.2/Modules/ |
cryptmodule.c | 17 char *word, *salt;
local 22 if (!PyArg_ParseTuple(args, "ss:crypt", &word, &salt)) {
26 salt. Return None in that case. XXX Maybe raise an exception? */
27 return Py_BuildValue("s", crypt(word, salt));
32 "crypt(word, salt) -> string\n\
33 word will usually be a user's password. salt is a 2-character string\n\
35 in salt must be either \".\", \"/\", or an alphanumeric character. Returns\n\
37 the same alphabet as the salt.");
|
/external/toybox/toys/other/ |
mkpasswd.c | 1 /* mkpasswd.c - encrypt the given passwd using salt 14 usage: mkpasswd [-P FD] [-m TYPE] [-S SALT] [PASSWORD] [SALT] 20 -S SALT 29 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") [all...] |
/external/tpm2/ |
StartAuthSession.c | 36 OBJECT *tpmKey; // TPM key for decrypt salt 38 TPM2B_DATA salt; local 58 // Decrypting salt requires accessing the private portion of a key. 71 &in->encryptedSalt, &salt); 81 salt.t.size = 0; 106 in->bind, &salt, &out->sessionHandle);
|
/frameworks/base/tools/obbtool/ |
pbkdf2gen.cpp | 30 * Will print out the salt and key in hex. 51 unsigned char salt[SALT_LEN]; local 53 if (read(fd, &salt, SALT_LEN) != SALT_LEN) { 54 fprintf(stderr, "Could not read salt from /dev/urandom: %s\n", strerror(errno)); 62 if (PKCS5_PBKDF2_HMAC_SHA1(argv[1], strlen(argv[1]), salt, SALT_LEN, 68 printf("salt="); 70 printf("%02x", salt[i]);
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/jcajce/ |
PKCS12KeyWithParameters.java | 14 private final byte[] salt; field in class:PKCS12KeyWithParameters 21 * @param salt salt for generation algorithm 24 public PKCS12KeyWithParameters(char[] password, byte[] salt, int iterationCount) 28 this.salt = Arrays.clone(salt); 38 * @param salt salt for generation algorithm 42 public PKCS12KeyWithParameters(char[] password, boolean useWrongZeroLengthConversion, byte[] salt, int iterationCount) 46 this.salt = Arrays.clone(salt) [all...] |
/libcore/ojluni/src/main/java/javax/crypto/spec/ |
PBEParameterSpec.java | 42 private byte[] salt; field in class:PBEParameterSpec 50 * @param salt the salt. The contents of <code>salt</code> are copied 53 * @exception NullPointerException if <code>salt</code> is null. 55 public PBEParameterSpec(byte[] salt, int iterationCount) { 56 this.salt = salt.clone(); 64 * @param salt the salt. The contents of <code>salt</code> are copie [all...] |
PBEKeySpec.java | 66 private byte[] salt = null; field in class:PBEKeySpec 89 * Constructor that takes a password, salt, iteration count, and 94 * <p> Note: the <code>password</code> and <code>salt</code> 99 * @param salt the salt. 102 * @exception NullPointerException if <code>salt</code> is null. 103 * @exception IllegalArgumentException if <code>salt</code> is empty, 107 public PBEKeySpec(char[] password, byte[] salt, int iterationCount, 114 if (salt == null) { 115 throw new NullPointerException("the salt parameter " [all...] |
/system/keymaster/ |
kdf_test.cpp | 34 uint8_t salt[128]; local 35 ASSERT_TRUE(kdf.Init(KM_DIGEST_SHA1, key, 128, salt, 128)); 36 ASSERT_TRUE(kdf.Init(KM_DIGEST_SHA_2_256, key, 128, salt, 128)); 38 ASSERT_FALSE(kdf.Init(KM_DIGEST_MD5, key, 128, salt, 128)); 39 ASSERT_FALSE(kdf.Init(KM_DIGEST_SHA1, nullptr, 0, salt, 128)); 40 ASSERT_FALSE(kdf.Init(KM_DIGEST_SHA1, nullptr, 128, salt, 128)); 41 ASSERT_FALSE(kdf.Init(KM_DIGEST_SHA1, key, 0, salt, 128));
|
hkdf_test.cpp | 63 const string salt = hex2str(test.salt_hex); local 70 reinterpret_cast<const uint8_t*>(salt.data()), salt.size()));
|
/external/boringssl/src/crypto/hkdf/ |
hkdf_test.cc | 31 const uint8_t salt[80]; member in struct:HKDFTestVector 258 test->salt, test->salt_len)) { 282 test->salt, test->salt_len, test->info, test->info_len)) {
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/asn1/pkcs/ |
PBEParameter.java | 18 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);
|
MacData.java | 22 byte[] salt; field in class:MacData 45 this.salt = Arrays.clone(((ASN1OctetString)seq.getObjectAt(1)).getOctets()); 59 byte[] salt, 63 this.salt = Arrays.clone(salt); 74 return Arrays.clone(salt); 98 v.add(new DEROctetString(salt));
|
/external/bouncycastle/bcprov/src/main/java/org/bouncycastle/crypto/ |
PBEParametersGenerator.java | 11 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;
|
/external/libchrome/crypto/ |
symmetric_key_unittest.cc | 71 const char* salt; member in struct:PBKDF2TestVector 85 test_data.algorithm, test_data.password, test_data.salt, 103 "salt", 111 "salt", 119 "salt", 129 "salt",
|
/external/lzma/CPP/7zip/Crypto/ |
RandGen.cpp | 23 // Please use it only for salt.
104 UInt32 salt = 0xF672ABD1;
local 105 HASH_UPD(salt);
|
/external/openssh/openbsd-compat/ |
port-uw.c | 57 char *salt; local 67 /* Encrypt the candidate password using the proper salt. */ 68 salt = (pw_password[0] && pw_password[1]) ? pw_password : "xx"; 76 result = ((strcmp(bigcrypt(password, salt), pw_password) == 0) 77 || (strcmp(osr5bigcrypt(password, salt), pw_password) == 0)); 81 result = (strcmp(xcrypt(password, salt), pw_password) == 0);
|
/external/scrypt/tests/ |
scrypt_test.cpp | 33 const char *pw, *salt; member in struct:android::scrypt_test_setting_t 70 crypto_scrypt((const uint8_t*) s.pw, strlen(s.pw), (const uint8_t*) s.salt, 71 strlen(s.salt), s.Nfactor, s.rfactor, s.pfactor, output, sizeof(output)))
|
/frameworks/base/core/jni/ |
android_content_res_ObbScanner.cpp | 38 jfieldID salt; member in struct:android::__anon38798 68 const unsigned char* salt = obb->getSalt(&saltLen); local 71 env->SetByteArrayRegion(saltArray, 0, saltLen, (jbyte*)salt); 72 env->SetObjectField(obbInfo, gObbInfoClassInfo.salt, saltArray); 93 gObbInfoClassInfo.salt = GetFieldIDOrDie(env, clazz, "salt", "[B");
|
/system/gatekeeper/include/gatekeeper/ |
password_handle.h | 40 salt_t salt; member in struct:gatekeeper::password_handle_t
|
/external/syslinux/com32/cmenu/libmenu/ |
passwords.c | 28 char salt[12]; local 35 strcpy(salt, userdb[i]->pwdhash); 36 salt[2] = '\0'; 37 if (strcmp(userdb[i]->pwdhash, crypt(pwd, salt)) == 0)
|
/external/toybox/toys/lsb/ |
passwd.c | 110 *orig = (char *)"", salt[MAX_SALT_LEN]; local 137 if (get_salt(salt, TT.algo) == -1) 164 encrypted = crypt(newp, salt);
|
/frameworks/base/core/java/android/content/res/ |
ObbInfo.java | 52 * The salt for the encryption algorithm. 56 public byte[] salt; field in class:ObbInfo 85 dest.writeByteArray(salt); 104 salt = source.createByteArray();
|
/frameworks/base/libs/androidfw/tests/ |
ObbFile_test.cpp | 68 unsigned char salt[SALT_SIZE] = {0x01, 0x10, 0x55, 0xAA, 0xFF, 0x00, 0x5A, 0xA5}; local 69 EXPECT_TRUE(mObbFile->setSalt(salt, SALT_SIZE)) 70 << "Salt should be successfully set"; 89 EXPECT_EQ(sizeof(salt), saltLen) 90 << "salt sizes were not the same"; 92 for (size_t i = 0; i < sizeof(salt); i++) { 93 EXPECT_EQ(salt[i], newSalt[i]) 94 << "salt character " << i << " should be equal"; 96 EXPECT_TRUE(memcmp(newSalt, salt, sizeof(salt)) == 0 [all...] |
/external/libbrillo/brillo/ |
cryptohome.cc | 29 static char g_system_salt_path[PATH_MAX] = "/home/.shadow/salt"; 31 static std::string* salt = nullptr; member in namespace:brillo::cryptohome::home 34 if (salt && !salt->empty()) 39 PLOG(ERROR) << "Could not get size of system salt: " << g_system_salt_path; 43 LOG(ERROR) << "System salt too large: " << file_size; 55 if (!salt) 56 salt = new std::string(); 57 salt->assign(buf.data(), file_size); 71 SHA1_Update(&ctx, salt->data(), salt->size()) [all...] |
/external/boringssl/src/crypto/pkcs8/ |
p5_pbev2.c | 144 size_t pass_len, const uint8_t *salt, 153 int ret = PKCS5_PBKDF2_HMAC_SHA1(pass, pass_len, salt, salt_len, iterations, 163 const uint8_t *salt, size_t salt_len) { 188 !CBB_add_bytes(&salt_cbb, salt, salt_len) || 204 return pkcs5_pbe2_cipher_init(ctx, cipher, iterations, pass, pass_len, salt, 237 CBS pbkdf2_params, salt; local 241 !CBS_get_asn1(&pbkdf2_params, &salt, CBS_ASN1_OCTETSTRING) || 305 pass_len, CBS_data(&salt), CBS_len(&salt),
|