|
libaaruformat 1.0
Aaru Data Preservation Suite - Format Library
|
Go to the source code of this file.
Functions | |
| static uint32_t | read_be32 (const uint8_t *p) |
| static uint32_t | read_le32 (const uint8_t *p) |
| static void | write_le32 (uint8_t *p, uint32_t v) |
| int32_t | ps3_parse_encryption_map (const uint8_t *sector0, uint32_t length, Ps3PlaintextRegion **regions, uint32_t *count) |
| Parse the encryption map from PS3 disc sector 0 (big-endian on disc). | |
| int32_t | ps3_serialize_encryption_map (const Ps3PlaintextRegion *regions, uint32_t count, uint8_t **out_data, uint32_t *out_length) |
| Serialize plaintext regions to little-endian binary for storage as a media tag. | |
| int32_t | ps3_deserialize_encryption_map (const uint8_t *data, uint32_t length, Ps3PlaintextRegion **regions, uint32_t *count) |
| Deserialize plaintext regions from little-endian binary (media tag format). | |
| bool | ps3_is_sector_encrypted (const Ps3PlaintextRegion *plaintext_regions, uint32_t region_count, uint64_t sector_address) |
| Check whether a sector is encrypted (i.e., not in any plaintext region). | |
| int32_t ps3_deserialize_encryption_map | ( | const uint8_t * | data, |
| uint32_t | length, | ||
| Ps3PlaintextRegion ** | regions, | ||
| uint32_t * | count ) |
Deserialize plaintext regions from little-endian binary (media tag format).
| data | Serialized data buffer. |
| length | Length of data buffer. |
| regions | Output: allocated array of plaintext regions. Caller must free(). |
| count | Output: number of regions. |
Definition at line 117 of file ps3_encryption_map.c.
References Ps3PlaintextRegion::end_sector, PS3_MAX_PLAINTEXT_REGIONS, read_le32(), and Ps3PlaintextRegion::start_sector.
Referenced by ps3_lazy_init().
| bool ps3_is_sector_encrypted | ( | const Ps3PlaintextRegion * | plaintext_regions, |
| uint32_t | region_count, | ||
| uint64_t | sector_address ) |
Check whether a sector is encrypted (i.e., not in any plaintext region).
| plaintext_regions | Array of plaintext regions. |
| region_count | Number of regions. |
| sector_address | Sector number to check. |
Definition at line 151 of file ps3_encryption_map.c.
Referenced by aaruf_read_sector(), and aaruf_write_sector().
| int32_t ps3_parse_encryption_map | ( | const uint8_t * | sector0, |
| uint32_t | length, | ||
| Ps3PlaintextRegion ** | regions, | ||
| uint32_t * | count ) |
Parse the encryption map from PS3 disc sector 0 (big-endian on disc).
| sector0 | Pointer to the 2048-byte sector 0 data. |
| length | Length of sector0 data (must be >= 264). |
| regions | Output: allocated array of plaintext regions. Caller must free(). |
| count | Output: number of regions. |
Definition at line 48 of file ps3_encryption_map.c.
References Ps3PlaintextRegion::end_sector, PS3_MAX_PLAINTEXT_REGIONS, read_be32(), and Ps3PlaintextRegion::start_sector.
| int32_t ps3_serialize_encryption_map | ( | const Ps3PlaintextRegion * | regions, |
| uint32_t | count, | ||
| uint8_t ** | out_data, | ||
| uint32_t * | out_length ) |
Serialize plaintext regions to little-endian binary for storage as a media tag.
Format: [4B region_count LE] + region_count × [4B start LE, 4B end LE]
| regions | Array of plaintext regions. |
| count | Number of regions. |
| out_data | Output: allocated buffer. Caller must free(). |
| out_length | Output: size of the buffer in bytes. |
Definition at line 94 of file ps3_encryption_map.c.
References PS3_MAX_PLAINTEXT_REGIONS, and write_le32().
|
static |
Definition at line 28 of file ps3_encryption_map.c.
Referenced by ps3_parse_encryption_map().
|
static |
Definition at line 34 of file ps3_encryption_map.c.
Referenced by ps3_deserialize_encryption_map().
|
static |
Definition at line 40 of file ps3_encryption_map.c.
Referenced by ps3_serialize_encryption_map().