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

/frameworks/base/libs/utils/tests/
H A DObbFile_test.cpp68 unsigned char salt[SALT_SIZE] = {0x01, 0x10, 0x55, 0xAA, 0xFF, 0x00, 0x5A, 0xA5}; local
69 EXPECT_TRUE(mObbFile->setSalt(salt, SALT_SIZE))
89 EXPECT_EQ(sizeof(salt), saltLen)
90 << "salt sizes were not the same";
92 for (int 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)
/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/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/core/jni/
H A Dandroid_content_res_ObbScanner.cpp35 jfieldID salt; member in struct:android::__anon31
75 const unsigned char* salt = obb->getSalt(&saltLen); local
78 env->SetByteArrayRegion(saltArray, 0, saltLen, (jbyte*)salt);
79 env->SetObjectField(obbInfo, gObbInfoClassInfo.salt, saltArray);
111 GET_FIELD_ID(gObbInfoClassInfo.salt, gObbInfoClassInfo.clazz,
112 "salt", "[B");
/frameworks/base/include/utils/
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/cmds/keystore/
H A Dkeystore.c356 static void set_key(uint8_t *key, uint8_t *password, int length, uint8_t *salt) argument
358 if (salt) {
359 PKCS5_PBKDF2_HMAC_SHA1((char *)password, length, salt, SALT_SIZE,
385 uint8_t *salt = NULL; local
390 salt = (uint8_t *)&blob + length - SALT_SIZE;
394 set_key(key, params[0].value, params[0].length, salt);
408 if (!salt && params[1].length == -1) {
416 uint8_t *salt = &blob.value[MASTER_KEY_SIZE]; local
417 if (read(the_entropy, salt, SALT_SIZE) != SALT_SIZE) {
421 set_key(key, params[1].value, params[1].length, salt);
[all...]
/frameworks/base/core/java/com/android/internal/widget/
H A DLockPatternUtils.java478 long salt = getLong(LOCK_PASSWORD_SALT_KEY, 0);
479 if (salt == 0) {
481 salt = SecureRandom.getInstance("SHA1PRNG").nextLong();
482 setLong(LOCK_PASSWORD_SALT_KEY, salt);
483 Log.v(TAG, "Initialized lock password salt");
489 return Long.toHexString(salt);
/frameworks/base/services/java/com/android/server/
H A DMountService.java1924 KeySpec ks = new PBEKeySpec(mKey.toCharArray(), obbInfo.salt,

Completed in 238 milliseconds