pyctr.type.tmd module
- exception pyctr.type.tmd.TitleMetadataError[source]
Bases:
PyCTRError
Generic exception for TitleMetadata operations.
- exception pyctr.type.tmd.InvalidSignatureTypeError(sig_type)[source]
Bases:
InvalidTMDError
Invalid signature type was used.
- exception pyctr.type.tmd.InvalidHashError[source]
Bases:
InvalidTMDError
Hash mismatch in the Title Metadata.
- class pyctr.type.tmd.ContentInfoRecord(index_offset, command_count, hash)[source]
Bases:
NamedTuple
- class pyctr.type.tmd.ContentChunkRecord(id, cindex, type, size, hash)[source]
Bases:
NamedTuple
- Parameters:
id (str) –
cindex (int) –
type (ContentTypeFlags) –
size (int) –
hash (bytes) –
- type: ContentTypeFlags
Alias for field number 2
- class pyctr.type.tmd.ContentTypeFlags(encrypted, disc, cfm, optional, shared)[source]
Bases:
NamedTuple
Alias for field number 4
- class pyctr.type.tmd.TitleVersion(major, minor, micro)[source]
Bases:
NamedTuple
- class pyctr.type.tmd.TitleMetadataReader(*, title_id, save_size, srl_save_size, title_version, info_records, chunk_records, signature=(65540, b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff'), _u_issuer='Root-CA00000003-CP0000000b', _u_version=1, _u_ca_crl_version=0, _u_signer_crl_version=0, _u_reserved1=0, _u_system_version=b'\x00\x00\x00\x00\x00\x00\x00\x00', _u_title_type=b'\x00\x00\x00@', _u_group_id=b'\x00\x00', _u_reserved2=b'\x00\x00\x00\x00', _u_srl_flag=0, _u_reserved3=b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', _u_access_rights=b'\x00\x00\x00\x00', _u_boot_count=b'\x00\x00', _u_padding=b'\x00\x00')[source]
Bases:
object
Class for 3DS Title Metadata.
https://www.3dbrew.org/wiki/Title_metadata
- Parameters:
title_id (str) –
save_size (int) –
srl_save_size (int) –
title_version (TitleVersion) –
info_records (Iterable[ContentInfoRecord]) –
chunk_records (Iterable[ContentChunkRecord]) –
- title_id
- save_size
- srl_save_size
- title_version
- info_records
- chunk_records
- content_count
- signature
- classmethod load(fp, verify_hashes=True)[source]
Load a tmd from a file-like object.
- Parameters:
fp (BinaryIO) –
verify_hashes (bool) –
- Return type: