fscrypt: integrate v1 processing into TWRP
Change-Id: I3bf9c14b818f9c3e0570c44c82bf0769fcec907f
This commit is contained in:
@@ -31,8 +31,13 @@ int main(int argc, char *argv[]) {
|
||||
fscrypt_policy_v2 fep;
|
||||
#endif
|
||||
if (fscrypt_policy_get_struct(argv[1], &fep)) {
|
||||
#ifdef USE_FSCRYPT_POLICY_V1
|
||||
char policy_hex[FS_KEY_DESCRIPTOR_SIZE_HEX];
|
||||
bytes_to_hex(fep.master_key_descriptor, FS_KEY_DESCRIPTOR_SIZE, policy_hex);
|
||||
#else
|
||||
char policy_hex[FSCRYPT_KEY_IDENTIFIER_HEX_SIZE];
|
||||
bytes_to_hex(fep.master_key_identifier, FSCRYPT_KEY_IDENTIFIER_SIZE, policy_hex);
|
||||
#endif
|
||||
printf("%s\n", policy_hex);
|
||||
} else {
|
||||
printf("No policy set\n");
|
||||
|
||||
Reference in New Issue
Block a user