/frameworks/base/tools/obbtool/ |
H A D | pbkdf2gen.cpp | 29 * 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 D | Main.cpp | 44 {"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...] |
/frameworks/base/core/java/android/content/res/ |
H A D | 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/ |
H A D | ObbFile_test.cpp | 70 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/core/jni/ |
H A D | android_content_res_ObbScanner.cpp | 36 jfieldID salt; member in struct:android::__anon1004 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/include/androidfw/ |
H A D | ObbFile.h | 84 bool setSalt(const unsigned char* salt, size_t length) { argument 89 memcpy(mSalt, salt, sizeof(mSalt)); 130 /* The encryption salt. */
|
/frameworks/base/services/java/com/android/server/pm/ |
H A D | UserManagerService.java | 87 private static final String ATTR_SALT = "salt"; 143 long salt; field in class:UserManagerService.RestrictionsPinState 646 if (pinState.salt != 0) { 647 serializer.attribute(null, ATTR_SALT, Long.toString(pinState.salt)); 745 long salt = 0L; 781 salt = readLongAttribute(parser, ATTR_SALT, 0L); 824 if (salt != 0L) { 830 pinState.salt = salt; 1135 pinState.salt 1263 passwordToHash(String password, long salt) argument [all...] |
/frameworks/base/services/java/com/android/server/ |
H A D | BackupManagerService.java | 421 // persisted) salt. Validation is performed by running the challenge text through the 422 // same PBKDF2 cycle with the persisted salt; if the resulting derived key string matches 762 // integer length of the salt array, followed by the salt, 765 byte[] salt = new byte[saltLen]; 766 in.readFully(salt); 768 mPasswordSalt = salt; 1046 private SecretKey buildPasswordKey(String pw, byte[] salt, int rounds) { argument 1047 return buildCharArrayKey(pw.toCharArray(), salt, rounds); 1050 private SecretKey buildCharArrayKey(char[] pwArray, byte[] salt, in argument 1063 buildPasswordHash(String pw, byte[] salt, int rounds) argument 1092 makeKeyChecksum(byte[] pwBytes, byte[] salt, int rounds) argument [all...] |