Searched refs:salt (Results 1 - 10 of 10) sorted by relevance

/frameworks/base/libs/androidfw/tests/
H A DObbFile_test.cpp70 unsigned char salt[SALT_SIZE] = {0x01, 0x10, 0x55, 0xAA, 0xFF, 0x00, 0x5A, 0xA5}; local
71 EXPECT_TRUE(mObbFile->setSalt(salt, SALT_SIZE))
91 EXPECT_EQ(sizeof(salt), saltLen)
92 << "salt sizes were not the same";
94 for (int i = 0; i < sizeof(salt); i++) {
95 EXPECT_EQ(salt[i], newSalt[i])
96 << "salt character " << i << " should be equal";
98 EXPECT_TRUE(memcmp(newSalt, salt, sizeof(salt)) == 0)
/frameworks/base/tools/obbtool/
H A Dpbkdf2gen.cpp29 * Will print out the salt and key in hex.
50 unsigned char salt[SALT_LEN]; local
52 if (read(fd, &salt, SALT_LEN) != SALT_LEN) {
53 fprintf(stderr, "Could not read salt from /dev/urandom: %s\n", strerror(errno));
61 if (PKCS5_PBKDF2_HMAC_SHA1(argv[1], strlen(argv[1]), salt, SALT_LEN,
67 printf("salt=");
69 printf("%02x", salt[i]);
H A DMain.cpp44 {"salt", required_argument, NULL, 's'},
57 memset(&salt, 0, sizeof(salt));
64 unsigned char salt[SALT_LEN]; member in class:PackageInfo
82 " -s <8 byte hex salt> sets the crypto key salt (if encrypted)\n"
103 obb->setSalt(info->salt, SALT_LEN);
145 const unsigned char* salt = obb->getSalt(&saltLen); local
146 if (salt != NULL) {
148 printf("%02x", salt[
[all...]
H A Dmkobb.sh262 echo "salt for use with obbtool is:"
263 echo "${salt}"
/frameworks/base/core/jni/
H A Dandroid_content_res_ObbScanner.cpp36 jfieldID salt; member in struct:android::__anon968
66 const unsigned char* salt = obb->getSalt(&saltLen); local
69 env->SetByteArrayRegion(saltArray, 0, saltLen, (jbyte*)salt);
70 env->SetObjectField(obbInfo, gObbInfoClassInfo.salt, saltArray);
102 GET_FIELD_ID(gObbInfoClassInfo.salt, clazz,
103 "salt", "[B");
/frameworks/base/core/java/android/content/res/
H A DObbInfo.java52 * The salt for the encryption algorithm.
56 public byte[] salt; field in class:ObbInfo
85 dest.writeByteArray(salt);
104 salt = source.createByteArray();
/frameworks/base/include/androidfw/
H A DObbFile.h84 bool setSalt(const unsigned char* salt, size_t length) { argument
89 memcpy(mSalt, salt, sizeof(mSalt));
130 /* The encryption salt. */
/frameworks/base/core/java/com/android/internal/widget/
H A DLockPatternUtils.java811 long salt = getLong(LOCK_PASSWORD_SALT_KEY, 0);
812 if (salt == 0) {
814 salt = SecureRandom.getInstance("SHA1PRNG").nextLong();
815 setLong(LOCK_PASSWORD_SALT_KEY, salt);
816 Log.v(TAG, "Initialized lock password salt");
822 return Long.toHexString(salt);
/frameworks/base/services/java/com/android/server/
H A DBackupManagerService.java417 // persisted) salt. Validation is performed by running the challenge text through the
418 // same PBKDF2 cycle with the persisted salt; if the resulting derived key string matches
755 // integer length of the salt array, followed by the salt,
758 byte[] salt = new byte[saltLen];
759 in.readFully(salt);
761 mPasswordSalt = salt;
1039 private SecretKey buildPasswordKey(String pw, byte[] salt, int rounds) { argument
1040 return buildCharArrayKey(pw.toCharArray(), salt, rounds);
1043 private SecretKey buildCharArrayKey(char[] pwArray, byte[] salt, in argument
1056 buildPasswordHash(String pw, byte[] salt, int rounds) argument
1085 makeKeyChecksum(byte[] pwBytes, byte[] salt, int rounds) argument
[all...]
H A DMountService.java2436 KeySpec ks = new PBEKeySpec(mKey.toCharArray(), obbInfo.salt,

Completed in 3029 milliseconds