### Example usage of neo_aa_header_get_field_key_index Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/func/neo_aa_header_get_field_key_index.md Calls the function with a header and a field key created by NEO_AA_FIELD_CC(). The returned index is stored in an int variable. ```c int index = neo_aa_header_get_field_key_index(header, NEO_AA_FIELD_CC("TYP")); ``` -------------------------------- ### neo_aa_archive_plain_outfile_size() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAArchivePlain.md Gets the size of the `.aar` file the NeoAAArchivePlain represents. ```APIDOC ## neo_aa_archive_plain_outfile_size() ### Description Gets the size of the `.aar` file the NeoAAArchivePlain represents. ### Method Function ### Signature `neo_aa_archive_plain_outfile_size()` ### Parameters - **archive** (NeoAAArchivePlain*) - The archive. ### Returns - The size of the `.aar` file. ``` -------------------------------- ### neo_aea_profile() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAEAArchive.md Gets the profile ID of the AEA. ```APIDOC ## neo_aea_profile() ### Description Gets the profile ID of the AEA. ### Returns - **profile ID** - The profile identifier of the AEA. ``` -------------------------------- ### neo_aea_auth_data() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAEAArchive.md Gets the auth data of the AEA. May need a call to extract_data first to decrypt it. Returns the raw internal pointer of the struct, so it should not be modified. ```APIDOC ## neo_aea_auth_data() ### Description Gets the auth data of the AEA. May need a call to extract_data first to decrypt it. Returns the raw internal pointer of the struct, so it should not be modified. ### Returns - **auth data** - The raw internal pointer to the auth data. ``` -------------------------------- ### neo_aa_header_get_field_key_index() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAHeader.md Returns the index to the field key in the NeoAAHeader. Getting the PAT field, you would use the first arg be the NeoAAHeader, and second be NEO_AA_FIELD_C("PAT"). ```APIDOC ## neo_aa_header_get_field_key_index() ### Description Returns the index to the field key in the NeoAAHeader. Getting the PAT field, you would use the first arg be the NeoAAHeader, and second be NEO_AA_FIELD_C("PAT"). ### Method Function ### Signature `neo_aa_header_get_field_key_index()` ### Parameters - **header** (NeoAAHeader*) - Required - The header to query. - **field_key** (string) - Required - The field key to find. ### Returns The index of the field key in the header. ``` -------------------------------- ### neo_aa_header_get_field_size Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/func/neo_aa_header_get_field_size.md Retrieves the size of the field value at the specified index in the header, in bytes. For example, a uint8_t field will return 1. ```APIDOC ## neo_aa_header_get_field_size ### Description Retrieves the size of the field value at the index in the header in bytes. For example, a uint8_t field will return 1. ### Function Signature ```c size_t neo_aa_header_get_field_size(NeoAAHeader header, int index); ``` ### Parameters - **header** (NeoAAHeader) - The NeoAAHeader representing the Apple Archive header. - **index** (int) - The index of the field key in the header. ### Return Value On success, this will return the index of the field key in the header. If it cannot find the field key in the header, this will return -1. ### Note `NEO_AA_FIELD_TYPE_BLOB`s will not return the blob size. This is as the blob data is not on the header, but the header only contains the size of the blob. So, if the blob size is stored in a uint16_t, it will return 2, if it is stored in a uint32_t, it will return 4, etc. `NEO_AA_FIELD_TYPE_STRING`s are in the header, and thus will return the size of the string. The 2 bytes containing the string size will not be accounted for in the header. ``` -------------------------------- ### neo_aa_archive_plain_create_with_aar_path() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAArchivePlain.md Creates a NeoAAArchivePlain from a path to a raw, uncompressed `.aar` file. ```APIDOC ## neo_aa_archive_plain_create_with_aar_path() ### Description Creates a NeoAAArchivePlain from a path to a raw, uncompressed `.aar` file. ### Method Function ### Signature `neo_aa_archive_plain_create_with_aar_path()` ### Parameters - **path** (string) - The path to the `.aar` file. ### Returns - A new NeoAAArchivePlain instance. ``` -------------------------------- ### neo_aa_header_create Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/func/neo_aa_header_create.md Creates a new, blank NeoAAHeader. The returned header is initialized to 6 bytes in length and contains no field keys. ```APIDOC ## neo_aa_header_create ### Description Creates a new, blank NeoAAHeader. The returned header is initialized to 6 bytes in length and contains no field keys. ### Function Signature ```c NeoAAHeader neo_aa_header_create(void); ``` ### Parameters None. ### Return Value - **NeoAAHeader** - The newly created NeoAAHeader, initialized to 6 bytes in length with no field keys. ``` -------------------------------- ### neo_aa_header_create() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAHeader.md Creates a new, blank NeoAAHeader. ```APIDOC ## neo_aa_header_create() ### Description Creates a new, blank NeoAAHeader. ### Method Function ### Signature `neo_aa_header_create()` ### Parameters None ### Returns A new NeoAAHeader instance. ``` -------------------------------- ### neo_aa_archive_plain_create_with_items() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAArchivePlain.md Creates a new NeoAAArchivePlain with a copy of the item list (array of NeoAAArchiveItem) and item count. ```APIDOC ## neo_aa_archive_plain_create_with_items() ### Description Creates a new NeoAAArchivePlain with a copy of the item list (array of NeoAAArchiveItem) and item count. ### Method Function ### Signature `neo_aa_archive_plain_create_with_items()` ### Parameters - **items** (array of NeoAAArchiveItem) - The item list to copy. - **item_count** (integer) - The number of items. ### Returns - A new NeoAAArchivePlain instance. ``` -------------------------------- ### neo_aa_archive_plain_create_with_items_nocopy() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAArchivePlain.md Creates a new NeoAAArchivePlain with the item list (array of NeoAAArchiveItem) and item count. ```APIDOC ## neo_aa_archive_plain_create_with_items_nocopy() ### Description Creates a new NeoAAArchivePlain with the item list (array of NeoAAArchiveItem) and item count. ### Method Function ### Signature `neo_aa_archive_plain_create_with_items_nocopy()` ### Parameters - **items** (array of NeoAAArchiveItem) - The item list. - **item_count** (integer) - The number of items. ### Returns - A new NeoAAArchivePlain instance. ``` -------------------------------- ### neo_aa_archive_plain_from_directory Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/func/neo_aa_archive_plain_from_directory.md Archives a directory into a NeoAAArchivePlain. On success, returns the newly created NeoAAArchivePlain; on failure, returns NULL. ```APIDOC ## neo_aa_archive_plain_from_directory ### Description Archives a directory into a NeoAAArchivePlain. On success, returns the newly created NeoAAArchivePlain; on failure, returns NULL. ### Function Signature ```c NeoAAArchivePlain neo_aa_archive_plain_from_directory(const char *dirPath); ``` ### Parameters - **dirPath** (const char*) - Required - A path to the directory you want to archive. ### Return Value - On success, returns the newly created NeoAAArchivePlain. - On failure, returns NULL. ``` -------------------------------- ### neo_aa_archive_plain_destroy_nozero() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAArchivePlain.md neo_aa_archive_item_list_destroy_nozero()'s the items, as well as frees the NeoAAArchivePlain itself. ```APIDOC ## neo_aa_archive_plain_destroy_nozero() ### Description neo_aa_archive_item_list_destroy_nozero()'s the items, as well as frees the NeoAAArchivePlain itself. ### Method Function ### Signature `neo_aa_archive_plain_destroy_nozero()` ### Parameters - **archive** (NeoAAArchivePlain*) - The archive to destroy. ### Returns - void ``` -------------------------------- ### neo_aea_archive_with_path(const char *path) Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/func/neo_aea_archive_with_path.md Creates a new NeoAEAArchive from the file at the specified path. Returns the newly created archive on success, or NULL on failure. ```APIDOC ## neo_aea_archive_with_path(const char *path) ### Description Creates a new NeoAEAArchive from the file at the specified path. ### Function Signature ```c NeoAEAArchive neo_aea_archive_with_path(const char *path); ``` ### Parameters - **path** (const char*) - Required - A path containing an Apple Encrypted Archive ### Return Value On success, this function will return the newly created NeoAEAArchive. On failure, this function will return NULL. ### Note For a version of the function that uses buffers, check out [neo_aea_archive_with_encoded_data_nocopy](neo_aea_archive_with_encoded_data_nocopy.md). ``` -------------------------------- ### neo_aa_archive_generic_from_path() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAArchiveGeneric.md Creates a new NeoAAArchiveGeneric from a filepath to an Apple Archive file, decompressing it for storage in the raw field. ```APIDOC ## neo_aa_archive_generic_from_path() ### Description Creates a new NeoAAArchiveGeneric with a filepath to the aar file, as well as decompresses it for storing in the NeoAAArchivePlain field. ### Parameters - **path** (const char*) - Required - Filepath to the Apple Archive file. ### Returns - **NeoAAArchiveGeneric** - A new NeoAAArchiveGeneric instance, or NULL on failure. ### Example ```c NeoAAArchiveGeneric generic = neo_aa_archive_generic_from_path("compressed_aar.aar"); ``` ``` -------------------------------- ### neo_aa_archive_generic_from_path Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/func/neo_aa_archive_generic_from_path.md Creates a new NeoAAArchiveGeneric from the file at the specified path. Returns NULL on failure. ```APIDOC ## neo_aa_archive_generic_from_path ### Description Creates a new NeoAAArchiveGeneric from the file at the specified path. Returns NULL on failure. ### Method C function ### Signature ```c NeoAAArchiveGeneric neo_aa_archive_generic_from_path(const char *path); ``` ### Parameters - **path** (const char*) - Required - A path containing an Apple Archive. ### Return Value - On success, returns the newly created NeoAAArchiveGeneric. - On failure, returns NULL. ### Note For a version of the function that uses buffers, see [neo_aa_archive_generic_from_encoded_data](neo_aa_archive_generic_from_encoded_data.md). ``` -------------------------------- ### neo_aa_archive_plain_create_with_encoded_data() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAArchivePlain.md Creates a NeoAAArchivePlain from encoded data (the binary data of an `.aar` file). ```APIDOC ## neo_aa_archive_plain_create_with_encoded_data() ### Description Creates a NeoAAArchivePlain from encoded data (the binary data of an `.aar` file). ### Method Function ### Signature `neo_aa_archive_plain_create_with_encoded_data()` ### Parameters - **data** (buffer) - The encoded data of an `.aar` file. ### Returns - A new NeoAAArchivePlain instance. ``` -------------------------------- ### neo_aa_archive_plain_write_path() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAArchivePlain.md Opens the filepath and calls neo_aa_archive_plain_writefd() with the NeoAAArchivePlain. ```APIDOC ## neo_aa_archive_plain_write_path() ### Description Opens the filepath and calls neo_aa_archive_plain_writefd() with the NeoAAArchivePlain. ### Method Function ### Signature `neo_aa_archive_plain_write_path()` ### Parameters - **archive** (NeoAAArchivePlain*) - The archive. - **filepath** (string) - The path to the file to write. ### Returns - void ``` -------------------------------- ### neo_aa_archive_item_create_with_header_copy Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/func/neo_aa_archive_item_create_with_header_copy.md Creates a new NeoAAArchiveItem with a copy of the NeoAAHeader for it. Returns the newly created NeoAAArchiveItem. ```APIDOC ## neo_aa_archive_item_create_with_header_copy ### Description Creates a new NeoAAArchiveItem with a copy of the NeoAAHeader for it. Returns the newly created NeoAAArchiveItem. ### Function Signature ```c NeoAAArchiveItem neo_aa_archive_item_create_with_header_copy(NeoAAHeader header); ``` ### Parameters - **header** (NeoAAHeader) - Required - The header to copy for the new archive item. ### Return Value - **NeoAAArchiveItem** - The newly created NeoAAArchiveItem. ``` -------------------------------- ### neo_aa_archive_plain_destroy() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAArchivePlain.md 0's out and neo_aa_archive_item_list_destroy()'s the items, as well as frees the NeoAAArchivePlain itself. ```APIDOC ## neo_aa_archive_plain_destroy() ### Description 0's out and neo_aa_archive_item_list_destroy()'s the items, as well as frees the NeoAAArchivePlain itself. ### Method Function ### Signature `neo_aa_archive_plain_destroy()` ### Parameters - **archive** (NeoAAArchivePlain*) - The archive to destroy. ### Returns - void ``` -------------------------------- ### neo_aa_archive_plain_with_neo_aea_archive() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAEAArchive.md Extracts data using neo_aea_extract_data() and creates a NeoAAArchivePlain from it. ```APIDOC ## neo_aa_archive_plain_with_neo_aea_archive() ### Description Extracts data using neo_aea_extract_data() and creates a NeoAAArchivePlain from it. ### Returns - **NeoAAArchivePlain** - The created plain archive object. ``` -------------------------------- ### neo_aa_header_clone_header() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAHeader.md malloc()'s a new clone of the header, as well as all field keys and their values. ```APIDOC ## neo_aa_header_clone_header() ### Description malloc()'s a new clone of the header, as well as all field keys and their values. ### Method Function ### Signature `neo_aa_header_clone_header()` ### Parameters - **header** (NeoAAHeader*) - Required - The header to clone. ### Returns A new NeoAAHeader instance that is a clone of the original. ``` -------------------------------- ### neo_aa_archive_item_create_with_header_copy() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAArchiveItem.md Creates a new NeoAAArchiveItem with a copy of the NeoAAHeader for it. ```APIDOC ## neo_aa_archive_item_create_with_header_copy() ### Description Creates a new NeoAAArchiveItem with a copy of the NeoAAHeader for it. ### Method Function ### Endpoint neo_aa_archive_item_create_with_header_copy() ### Parameters - **header** (NeoAAHeader) - Required - The NeoAAHeader to copy for the archive item. ### Response Returns a new NeoAAArchiveItem. ``` -------------------------------- ### neo_aa_archive_plain_writefd() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAArchivePlain.md Writes the Apple Archive for the NeoAAArchivePlain to an open file descriptor. ```APIDOC ## neo_aa_archive_plain_writefd() ### Description Writes the Apple Archive for the NeoAAArchivePlain to an open file descriptor. ### Method Function ### Signature `neo_aa_archive_plain_writefd()` ### Parameters - **archive** (NeoAAArchivePlain*) - The archive. - **fd** (file descriptor) - The open file descriptor to write to. ### Returns - void ``` -------------------------------- ### neo_aa_archive_plain_with_neo_aea_archive Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/func/neo_aa_archive_plain_with_neo_aea_archive.md Retrieves the encoded data from an Apple Encrypted Archive and creates a NeoAAArchivePlain from it. On success, returns a NeoAAArchivePlain; on failure, returns NULL. ```APIDOC ## neo_aa_archive_plain_with_neo_aea_archive ### Description Retrieves the encoded data from an Apple Encrypted Archive, and creates a NeoAAArchivePlain from it. ### Function Signature ```c NeoAAArchivePlain neo_aa_archive_plain_with_neo_aea_archive(NeoAEAArchive aea); ``` ### Parameters - **aea** (NeoAEAArchive) - Required - The NeoAEAArchive representing the Apple Encrypted Archive. ### Return Value On success, this will return a NeoAAArchivePlain. On failure, this function will return NULL. ``` -------------------------------- ### neo_aa_archive_item_create_with_header Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/func/neo_aa_archive_item_create_with_header.md Creates a new NeoAAArchiveItem with the provided NeoAAHeader. The function stores a direct pointer to the header, so the caller must not free or destroy the header while the item is in use. Returns the newly created item, or NULL on failure (e.g., if the header is already used by another item). ```APIDOC ## neo_aa_archive_item_create_with_header ### Description Creates a new NeoAAArchiveItem with the provided NeoAAHeader. The function stores a direct pointer to the header, so the caller must not free or destroy the header while the item is in use. Returns the newly created item, or NULL on failure (e.g., if the header is already used by another item). ### Function Signature ```c NeoAAArchiveItem neo_aa_archive_item_create_with_header(NeoAAHeader header); ``` ### Parameters - **header** (NeoAAHeader) - Required - The NeoAAHeader to associate with the new item. The header must not be already used by another NeoAAArchiveItem. ### Return Value - **NeoAAArchiveItem** - The newly created NeoAAArchiveItem. On failure (such as the header being already used), returns a NULL pointer. ``` -------------------------------- ### neo_aa_archive_plain_get_encoded_data() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAArchivePlain.md Writes the Apple Archive for the NeoAAArchivePlain to a buffer and returns it. ```APIDOC ## neo_aa_archive_plain_get_encoded_data() ### Description Writes the Apple Archive for the NeoAAArchivePlain to a buffer and returns it. ### Method Function ### Signature `neo_aa_archive_plain_get_encoded_data()` ### Parameters - **archive** (NeoAAArchivePlain*) - The archive. ### Returns - A buffer containing the encoded Apple Archive data. ``` -------------------------------- ### Convert NeoAAArchiveGeneric to NeoAAArchivePlain Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAArchiveGeneric.md Access the `raw` field of a `NeoAAArchiveGeneric` to obtain the uncompressed `NeoAAArchivePlain`. After extracting, free the generic object and destroy the plain archive when done. ```c NeoAAArchiveGeneric generic = neo_aa_archive_generic_from_path("compressed_aar.aar"); if (generic) { NeoAAArchivePlain raw = generic->raw; /* * Since we have gotten the raw element from our NeoAAArchiveGeneric, * we should free the NeoAAArchiveGeneric as we are no longer accessing it. */ free(generic); // ... code using the NeoAAArchivePlain here. // After we are done with usage, destroy it. neo_aa_archive_plain_destroy(raw); } ``` -------------------------------- ### neo_aea_with_encoded_data() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAEAArchive.md Copies the provided encoded data and creates a NeoAEAArchive from it. ```APIDOC ## neo_aea_with_encoded_data() ### Description Copies the provided encoded data and creates a NeoAEAArchive from it. ### Parameters - **encoded_data** (buffer) - Required - The encoded data of the .aea file. ### Returns - **NeoAEAArchive** - The created archive object. ``` -------------------------------- ### neo_aa_header_create_with_encoded_data Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/func/neo_aa_header_create_with_encoded_data.md Creates an Apple Archive header from a copy of the encoded data. Returns a newly created NeoAAHeader on success, or NULL on failure. ```APIDOC ## neo_aa_header_create_with_encoded_data ### Description Creates an Apple Archive header from a copy of the encoded data. ### Function Signature ```c NeoAAHeader neo_aa_header_create_with_encoded_data(size_t encodedSize, uint8_t *data); ``` ### Parameters - **encodedSize** (size_t) - Required - The size of the encoded data in bytes. - **data** (uint8_t*) - Required - The encoded data to form the Apple Archive header from. ### Return Value On success, returns the newly created NeoAAHeader. On failure, returns NULL. ``` -------------------------------- ### neo_aea_archive_with_encoded_data_nocopy Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/func/neo_aea_archive_with_encoded_data_nocopy.md Creates an Apple Encrypted Archive from the encoded data without copying it. On success, returns the newly created NeoAEAArchive; on failure, returns NULL. ```APIDOC ## neo_aea_archive_with_encoded_data_nocopy ### Description Creates an Apple Encrypted Archive from the encoded data. ### Function Signature ```c NeoAEAArchive neo_aea_archive_with_encoded_data_nocopy(uint8_t *encodedData, size_t encodedDataSize); ``` ### Parameters - **encodedData** (uint8_t*) - Required - The encoded data to form the Apple Encrypted Archive from. - **encodedDataSize** (size_t) - Required - The size of the encoded data in bytes. ### Return Value On success, this function will return the newly created NeoAEAArchive. On failure, this function will return NULL. ### Note For a version of the function that copies the encoded data, check out [neo_aea_archive_with_encoded_data](neo_aea_archive_with_encoded_data.md). ``` -------------------------------- ### neo_aa_archive_generic_from_encoded_data() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAArchiveGeneric.md Creates a new NeoAAArchiveGeneric from a buffer of encoded data, decompressing the NeoAAArchivePlain from it to store in the raw field. ```APIDOC ## neo_aa_archive_generic_from_encoded_data() ### Description Creates a new NeoAAArchiveGeneric with a buffer of encoded data, as well as decompresses the NeoAAArchivePlain from it to store in the `raw` field. ### Parameters - **data** (const void*) - Required - Buffer of encoded Apple Archive data. - **size** (size_t) - Required - Size of the data buffer. ### Returns - **NeoAAArchiveGeneric** - A new NeoAAArchiveGeneric instance, or NULL on failure. ### Example ```c NeoAAArchiveGeneric generic = neo_aa_archive_generic_from_encoded_data(data, size); ``` ``` -------------------------------- ### neo_aea_with_encoded_data_nocopy() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAEAArchive.md Creates a NeoAEAArchive from encoded data without copying the data. ```APIDOC ## neo_aea_with_encoded_data_nocopy() ### Description Creates a NeoAEAArchive from encoded data (encoded data is a buffer of the actual .aea file). ### Parameters - **encoded_data** (buffer) - Required - The encoded data of the .aea file. ### Returns - **NeoAEAArchive** - The created archive object. ``` -------------------------------- ### Accessing raw field Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAArchiveGeneric.md Convert a NeoAAArchiveGeneric to a NeoAAArchivePlain by accessing the raw element. After extracting the raw element, free the generic to avoid memory leaks. ```APIDOC ## Accessing raw field ### Description Convert a NeoAAArchiveGeneric to a NeoAAArchivePlain by accessing the `raw` element. After extracting the raw element, free the generic to avoid memory leaks. ### Usage ```c NeoAAArchiveGeneric generic = neo_aa_archive_generic_from_path("compressed_aar.aar"); if (generic) { NeoAAArchivePlain raw = generic->raw; free(generic); // ... code using the NeoAAArchivePlain here. neo_aa_archive_plain_destroy(raw); } ``` ``` -------------------------------- ### neo_aa_archive_item_create_with_encoded_data() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAArchiveItem.md Creates a NeoAAArchiveItem from encoded data (the binary data of an .aar file). ```APIDOC ## neo_aa_archive_item_create_with_encoded_data() ### Description Creates a NeoAAArchiveItem from encoded data (the binary data of an .aar file). ### Method Function ### Endpoint neo_aa_archive_item_create_with_encoded_data() ### Parameters - **data** (encoded data) - Required - The binary data of an .aar file. ### Response Returns a new NeoAAArchiveItem. ``` -------------------------------- ### neo_aa_header_create_with_encoded_data() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAHeader.md Creates a NeoAAHeader from encoded data (encoded data is how the header is represented in the actual .aar file). ```APIDOC ## neo_aa_header_create_with_encoded_data() ### Description Creates a NeoAAHeader from encoded data (encoded data is how the header is represented in the actual .aar file). ### Method Function ### Signature `neo_aa_header_create_with_encoded_data()` ### Parameters - **encoded_data** (type) - Required - The encoded data representing the header. ### Returns A new NeoAAHeader instance. ``` -------------------------------- ### neo_aa_header_destroy_nozero() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAHeader.md Frees all elements of a NeoAAHeader, as well as frees the NeoAAHeader itself. ```APIDOC ## neo_aa_header_destroy_nozero() ### Description Frees all elements of a NeoAAHeader, as well as frees the NeoAAHeader itself. ### Method Function ### Signature `neo_aa_header_destroy_nozero()` ### Parameters - **header** (NeoAAHeader*) - Required - The header to destroy. ### Returns Void. ``` -------------------------------- ### neo_aea_archive_with_encoded_data Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/func/neo_aea_archive_with_encoded_data.md Creates an Apple Encrypted Archive from a copy of the encoded data. On success, returns a newly created NeoAEAArchive; on failure, returns NULL. ```APIDOC ## neo_aea_archive_with_encoded_data ### Description Creates an Apple Encrypted Archive from a copy of the encoded data. On success, returns a newly created NeoAEAArchive; on failure, returns NULL. ### Function Signature ```c NeoAEAArchive neo_aea_archive_with_encoded_data(uint8_t *encodedData, size_t encodedDataSize); ``` ### Parameters - **encodedData** (uint8_t*) - Required - The encoded data to form the Apple Encrypted Archive from. - **encodedDataSize** (size_t) - Required - The size of the encoded data in bytes. ### Return Value - On success, returns the newly created NeoAEAArchive. - On failure, returns NULL. ### Note For a version of the function that does not copy the encoded data, see [neo_aea_archive_with_encoded_data_nocopy](neo_aea_archive_with_encoded_data_nocopy.md). ``` -------------------------------- ### neo_aa_header_destroy_nozero(NeoAAHeader header) Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/func/neo_aa_header_destroy_nozero.md Frees all elements of a NeoAAHeader, as well as frees the NeoAAHeader itself. This function does not zero out the memory before freeing, unlike its counterpart neo_aa_header_destroy. ```APIDOC ## neo_aa_header_destroy_nozero(NeoAAHeader header) ### Description Frees all elements of a NeoAAHeader, as well as frees the NeoAAHeader itself. This function does not zero out the memory before freeing, unlike its counterpart neo_aa_header_destroy. ### Method Function ### Signature ```c void neo_aa_header_destroy_nozero(NeoAAHeader header); ``` ### Parameters - **header** (NeoAAHeader) - Required - The NeoAAHeader representing the Apple Archive header. ### Return Value None (void). ### Note For a version of the function that does zero out data, check out neo_aa_header_destroy. Please keep in mind that some systems implement free() in a way that automatically will zero out data anyway. ``` -------------------------------- ### Function signature for neo_aa_header_get_field_key_index Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/func/neo_aa_header_get_field_key_index.md Declares the function that retrieves the index of a field key in an Apple Archive header. The index is zero-based. Returns -1 if the key is not found. ```c int neo_aa_header_get_field_key_index(NeoAAHeader header, uint32_t key); ``` -------------------------------- ### neo_aa_archive_item_destroy_nozero() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAArchiveItem.md Frees the encoded data, destroys the NeoAAHeader without zeroing, and frees the NeoAAArchiveItem itself. ```APIDOC ## neo_aa_archive_item_destroy_nozero() ### Description Frees the encoded data, destroys the NeoAAHeader without zeroing, and frees the NeoAAArchiveItem itself. ### Method Function ### Endpoint neo_aa_archive_item_destroy_nozero() ### Parameters - **item** (NeoAAArchiveItem*) - Required - The archive item to destroy. ### Response No return value. ``` -------------------------------- ### neo_aa_archive_item_list_destroy_nozero() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAArchiveItem.md Destroys an array of NeoAAArchiveItems without zeroing. ```APIDOC ## neo_aa_archive_item_list_destroy_nozero() ### Description Destroys an array of NeoAAArchiveItems without zeroing. ### Method Function ### Endpoint neo_aa_archive_item_list_destroy_nozero() ### Parameters - **items** (NeoAAArchiveItem*) - Required - The array of archive items to destroy. ### Response No return value. ``` -------------------------------- ### neo_aa_archive_item_write_to_buffer() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAArchiveItem.md Writes the encoded data and header to a buffer. This is how the item will be represented in the end raw .aar file. ```APIDOC ## neo_aa_archive_item_write_to_buffer() ### Description Writes the encoded data and header to a buffer. This is how the item will be represented in the end raw .aar file. ### Method Function ### Endpoint neo_aa_archive_item_write_to_buffer() ### Parameters - **item** (NeoAAArchiveItem*) - Required - The archive item to write. - **buffer** (buffer) - Required - The buffer to write to. ### Response No return value. ``` -------------------------------- ### neo_aa_header_get_field_key_index(header, key) Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/func/neo_aa_header_get_field_key_index.md Retrieves the index of where the field key is on the Apple Archive header, indexed by 0. Returns -1 if the field key is not found in the header. ```APIDOC ## [C] neo_aa_header_get_field_key_index ### Description Retrieves the index of where the field key is on the Apple Archive header. (Indexed by 0). ### Method C Function ### Signature ```c int neo_aa_header_get_field_key_index(NeoAAHeader header, uint32_t key); ``` ### Parameters - **header** (NeoAAHeader) - Required - The NeoAAHeader representing the Apple Archive header. - **key** (uint32_t) - Required - The field key to get the index of. Created by `NEO_AA_FIELD_CC().` ### Return Value On success, this will return the index of the field key in the header. If it cannot find the field key in the header, this will return -1. ### Example Usage ```c int index = neo_aa_header_get_field_key_index(header, NEO_AA_FIELD_CC("TYP")); ``` ``` -------------------------------- ### neo_aa_header_destroy Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/func/neo_aa_header_destroy.md Frees and zeroes out all elements of a NeoAAHeader, then frees the NeoAAHeader itself. This function is part of the libneoapplearchive C library. ```APIDOC ## neo_aa_header_destroy ### Description Frees and 0's out all elements of a NeoAAHeader, as well as frees the NeoAAHeader itself. ### Function Signature ```c void neo_aa_header_destroy(NeoAAHeader header); ``` ### Parameters - **header** (NeoAAHeader) - Required - The NeoAAHeader representing the Apple Archive header. ### Notes - For a version of the function that does not zero data, see `neo_aa_header_destroy_nozero`. - Some systems implement `free()` in a way that automatically zeroes out data anyway. ``` -------------------------------- ### neo_aea_profile Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/func/neo_aea_profile.md Retrieves the profile ID of an Apple Encrypted Archive. Takes a NeoAEAArchive handle and returns the profile ID as a uint32_t. ```APIDOC ## neo_aea_profile ### Description Retrieves the profile ID of an Apple Encrypted Archive. ### Function Signature ```c uint32_t neo_aea_profile(NeoAEAArchive aea); ``` ### Parameters - **aea** (NeoAEAArchive) - Required - The NeoAEAArchive representing the Apple Encrypted Archive. ### Return Value - **uint32_t** - The profile ID of the Apple Encrypted Archive. ``` -------------------------------- ### neo_aa_header_get_field_key_string() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAHeader.md Returns the string of the field key at the index in the header. ```APIDOC ## neo_aa_header_get_field_key_string() ### Description Returns the string of the field key at the index in the header. ### Method Function ### Signature `neo_aa_header_get_field_key_string()` ### Parameters - **header** (NeoAAHeader*) - Required - The header to query. - **index** (int) - Required - The index of the field key. ### Returns The string value of the field key. ``` -------------------------------- ### neo_aa_header_get_field_key_uint() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAHeader.md Returns the uint of the field key at the index in the header. ```APIDOC ## neo_aa_header_get_field_key_uint() ### Description Returns the uint of the field key at the index in the header. ### Method Function ### Signature `neo_aa_header_get_field_key_uint()` ### Parameters - **header** (NeoAAHeader*) - Required - The header to query. - **index** (int) - Required - The index of the field key. ### Returns The uint value of the field key. ``` -------------------------------- ### neo_aa_header_destroy() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAHeader.md Frees and 0's out all elements of a NeoAAHeader, as well as frees the NeoAAHeader itself. ```APIDOC ## neo_aa_header_destroy() ### Description Frees and 0's out all elements of a NeoAAHeader, as well as frees the NeoAAHeader itself. ### Method Function ### Signature `neo_aa_header_destroy()` ### Parameters - **header** (NeoAAHeader*) - Required - The header to destroy. ### Returns Void. ``` -------------------------------- ### neo_aa_header_set_field_uint() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAHeader.md Sets the value of the uint in the header, or adds it if it is not present. ```APIDOC ## neo_aa_header_set_field_uint() ### Description Sets the value of the uint in the header, or adds it if it is not present. ### Method Function ### Signature `neo_aa_header_set_field_uint()` ### Parameters - **header** (NeoAAHeader*) - Required - The header to modify. - **field_key** (string) - Required - The field key to set. - **value** (uint) - Required - The value to set. ### Returns Void. ``` -------------------------------- ### neo_aea_destroy() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAEAArchive.md Destroys / frees the NeoAEAArchive and all fields in the object. ```APIDOC ## neo_aea_destroy() ### Description Destroys / frees the NeoAEAArchive and all fields in the object. ### Parameters - **archive** (NeoAEAArchive) - Required - The archive object to destroy. ``` -------------------------------- ### neo_aa_header_set_field_string() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAHeader.md Sets the value of the string in the header, or adds it if it is not present. ```APIDOC ## neo_aa_header_set_field_string() ### Description Sets the value of the string in the header, or adds it if it is not present. ### Method Function ### Signature `neo_aa_header_set_field_string()` ### Parameters - **header** (NeoAAHeader*) - Required - The header to modify. - **field_key** (string) - Required - The field key to set. - **value** (string) - Required - The string value to set. ### Returns Void. ``` -------------------------------- ### neo_aa_archive_item_destroy() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAArchiveItem.md Frees and zeroes out the encoded data, zeroes and destroys the NeoAAHeader, and frees the NeoAAArchiveItem itself. ```APIDOC ## neo_aa_archive_item_destroy() ### Description Frees and zeroes out the encoded data, zeroes and destroys the NeoAAHeader, and frees the NeoAAArchiveItem itself. ### Method Function ### Endpoint neo_aa_archive_item_destroy() ### Parameters - **item** (NeoAAArchiveItem*) - Required - The archive item to destroy. ### Response No return value. ``` -------------------------------- ### neo_aa_header_set_field_blob() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAHeader.md Sets the size of the blob in the header, or adds it if it is not present. ```APIDOC ## neo_aa_header_set_field_blob() ### Description Sets the size of the blob in the header, or adds it if it is not present. ### Method Function ### Signature `neo_aa_header_set_field_blob()` ### Parameters - **header** (NeoAAHeader*) - Required - The header to modify. - **field_key** (string) - Required - The field key to set. - **size** (size_t) - Required - The size of the blob. ### Returns Void. ``` -------------------------------- ### neo_aea_archive_extract_data Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/func/neo_aea_archive_extract_data.md Decrypts the NeoAEAArchive if it is encrypted, and extracts the data from the Apple Encrypted Archive. Note that this does not verify signing. ```APIDOC ## neo_aea_archive_extract_data ### Description Decrypts the NeoAEAArchive if it is encrypted, and extracts the data from the Apple Encrypted Archive. Note that this does not verify signing. ### Function Signature ```c uint8_t *neo_aea_archive_extract_data(NeoAEAArchive aea, size_t *size, EVP_PKEY* recPriv, EVP_PKEY* signaturePub, uint8_t* symmKey, size_t symmKeySize, uint8_t* password, size_t passwordSize); ``` ### Parameters - **aea** (NeoAEAArchive) - The NeoAEAArchive representing the Apple Encrypted Archive. - **size** (size_t*) - If this is not null, this parameter will be filled with the size of the extracted data in bytes. - **recPriv** (EVP_PKEY*) - TODO: Finish docs on other params - **signaturePub** (EVP_PKEY*) - TODO: Finish docs on other params - **symmKey** (uint8_t*) - TODO: Finish docs on other params - **symmKeySize** (size_t) - TODO: Finish docs on other params - **password** (uint8_t*) - TODO: Finish docs on other params - **passwordSize** (size_t) - TODO: Finish docs on other params ### Return Value On success, this returns the extracted data from the Apple Encrypted Archive. On failure, this function returns NULL. ``` -------------------------------- ### neo_aa_header_get_field_size() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAHeader.md Returns the size of the field key at the index in the header. ```APIDOC ## neo_aa_header_get_field_size() ### Description Returns the size of the field key at the index in the header. ### Method Function ### Signature `neo_aa_header_get_field_size()` ### Parameters - **header** (NeoAAHeader*) - Required - The header to query. - **index** (int) - Required - The index of the field key. ### Returns The size of the field key. ``` -------------------------------- ### neo_aa_archive_item_list_destroy() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAArchiveItem.md Destroys an array of NeoAAArchiveItems. ```APIDOC ## neo_aa_archive_item_list_destroy() ### Description Destroys an array of NeoAAArchiveItems. ### Method Function ### Endpoint neo_aa_archive_item_list_destroy() ### Parameters - **items** (NeoAAArchiveItem*) - Required - The array of archive items to destroy. ### Response No return value. ``` -------------------------------- ### neo_aea_archive_auth_data Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/func/neo_aea_archive_auth_data.md Retrieves the auth data from an Apple Encrypted Archive. The function returns a pointer to the auth data and optionally provides its size. ```APIDOC ## neo_aea_archive_auth_data ### Description Retrieves the auth data from an Apple Encrypted Archive. The function returns a pointer to the auth data and optionally provides its size. ### Function Signature ```c uint8_t *neo_aea_archive_auth_data(NeoAEAArchive aea, uint32_t *authDataSize); ``` ### Parameters - **aea** (NeoAEAArchive) - Required - The NeoAEAArchive representing the Apple Encrypted Archive. - **authDataSize** (uint32_t*) - Optional - If not null, this parameter will be filled with the size of the auth data in bytes. ### Return Value A pointer to the auth data on the NeoAEAArchive. This is used internally in the NeoAEAArchive, so it should not be modified. ``` -------------------------------- ### neo_aa_archive_item_add_blob_data() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAArchiveItem.md Adds the encoded blob data and size to the NeoAAArchiveItem. ```APIDOC ## neo_aa_archive_item_add_blob_data() ### Description Adds the encoded blob data and size to the NeoAAArchiveItem. ### Method Function ### Endpoint neo_aa_archive_item_add_blob_data() ### Parameters - **data** (blob) - Required - The encoded blob data. - **size** (size_t) - Required - The size of the encoded blob data. ### Response No return value. ``` -------------------------------- ### neo_aea_archive_destroy(NeoAEAArchive aea) Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/func/neo_aea_archive_destroy.md Frees the NeoAEAArchive struct, as well as all elements on it. This function is used to clean up resources associated with an Apple Encrypted Archive object. ```APIDOC ## neo_aea_archive_destroy ### Description Frees the NeoAEAArchive struct, as well as all elements on it. ### Function Signature ```c void neo_aea_archive_destroy(NeoAEAArchive aea); ``` ### Parameters - **aea** (NeoAEAArchive) - Required - The NeoAEAArchive representing the Apple Encrypted Archive. ### Return Value - None (void) ``` -------------------------------- ### neo_aa_header_get_field_type() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAHeader.md Returns the NeoAAFieldType of the field key. ```APIDOC ## neo_aa_header_get_field_type() ### Description Returns the NeoAAFieldType of the field key. ### Method Function ### Signature `neo_aa_header_get_field_type()` ### Parameters - **header** (NeoAAHeader*) - Required - The header to query. - **field_key** (string) - Required - The field key to get the type of. ### Returns The NeoAAFieldType of the field key. ``` -------------------------------- ### neo_aa_header_remove_field_at_index() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAHeader.md Removes the field key at the index from the header. ```APIDOC ## neo_aa_header_remove_field_at_index() ### Description Removes the field key at the index from the header. ### Method Function ### Signature `neo_aa_header_remove_field_at_index()` ### Parameters - **header** (NeoAAHeader*) - Required - The header to modify. - **index** (int) - Required - The index of the field key to remove. ### Returns Void. ``` -------------------------------- ### neo_aa_header_set_field_timespec() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAHeader.md Sets the value of the timespec in the header, or adds it if it is not present. ```APIDOC ## neo_aa_header_set_field_timespec() ### Description Sets the value of the timespec in the header, or adds it if it is not present. ### Method Function ### Signature `neo_aa_header_set_field_timespec()` ### Parameters - **header** (NeoAAHeader*) - Required - The header to modify. - **field_key** (string) - Required - The field key to set. - **value** (timespec) - Required - The timespec value to set. ### Returns Void. ``` -------------------------------- ### neo_aa_header_remove_field() Source: https://github.com/0xilis/libneoapplearchive/blob/main/docs/NeoAAHeader.md Removes the field key from the header. ```APIDOC ## neo_aa_header_remove_field() ### Description Removes the field key from the header. ### Method Function ### Signature `neo_aa_header_remove_field()` ### Parameters - **header** (NeoAAHeader*) - Required - The header to modify. - **field_key** (string) - Required - The field key to remove. ### Returns Void. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.