mirror of
https://github.com/jakcron/nstool
synced 2024-11-15 02:06:40 +00:00
[es] Change order of methods.
This commit is contained in:
parent
d802197887
commit
92cf66ecea
1 changed files with 50 additions and 50 deletions
|
@ -42,56 +42,6 @@ size_t es::TicketBody_V2::getSize() const
|
||||||
return mBinaryBlob.getSize();
|
return mBinaryBlob.getSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool es::TicketBody_V2::isEqual(const TicketBody_V2 & other) const
|
|
||||||
{
|
|
||||||
return (mIssuer == other.mIssuer) \
|
|
||||||
&& (memcmp(mEncTitleKey, other.mEncTitleKey, ticket::kEncTitleKeySize) == 0) \
|
|
||||||
&& (mEncType == other.mEncType) \
|
|
||||||
&& (mTicketVersion == other.mTicketVersion) \
|
|
||||||
&& (mLicenseType == other.mLicenseType) \
|
|
||||||
&& (mPreInstall == other.mPreInstall) \
|
|
||||||
&& (mSharedTitle == other.mSharedTitle) \
|
|
||||||
&& (mAllowAllContent == other.mAllowAllContent) \
|
|
||||||
&& (memcmp(mReservedRegion, other.mReservedRegion, ticket::kReservedRegionSize) == 0) \
|
|
||||||
&& (mTicketId == other.mTicketId) \
|
|
||||||
&& (mDeviceId == other.mDeviceId) \
|
|
||||||
&& (memcmp(mRightsId, other.mRightsId, ticket::kRightsIdSize) == 0) \
|
|
||||||
&& (mAccountId == other.mAccountId) \
|
|
||||||
&& (mSectTotalSize == other.mSectTotalSize) \
|
|
||||||
&& (mSectHeaderOffset == other.mSectHeaderOffset) \
|
|
||||||
&& (mSectNum == other.mSectNum) \
|
|
||||||
&& (mSectEntrySize == other.mSectEntrySize);
|
|
||||||
}
|
|
||||||
|
|
||||||
void es::TicketBody_V2::copyFrom(const TicketBody_V2 & other)
|
|
||||||
{
|
|
||||||
if (other.getSize())
|
|
||||||
{
|
|
||||||
importBinary(other.getBytes(), other.getSize());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
clear();
|
|
||||||
mIssuer = other.mIssuer;
|
|
||||||
memcpy(mEncTitleKey, other.mEncTitleKey, ticket::kEncTitleKeySize);
|
|
||||||
mEncType = other.mEncType;
|
|
||||||
mTicketVersion = other.mTicketVersion;
|
|
||||||
mLicenseType = other.mLicenseType;
|
|
||||||
mPreInstall = other.mPreInstall;
|
|
||||||
mSharedTitle = other.mSharedTitle;
|
|
||||||
mAllowAllContent = other.mAllowAllContent;
|
|
||||||
memcpy(mReservedRegion, other.mReservedRegion, ticket::kReservedRegionSize);
|
|
||||||
mTicketId = other.mTicketId;
|
|
||||||
mDeviceId = other.mDeviceId;
|
|
||||||
memcpy(mRightsId, other.mRightsId, ticket::kRightsIdSize);
|
|
||||||
mAccountId = other.mAccountId;
|
|
||||||
mSectTotalSize = other.mSectTotalSize;
|
|
||||||
mSectHeaderOffset = other.mSectHeaderOffset;
|
|
||||||
mSectNum = other.mSectNum;
|
|
||||||
mSectEntrySize = other.mSectEntrySize;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void es::TicketBody_V2::exportBinary()
|
void es::TicketBody_V2::exportBinary()
|
||||||
{
|
{
|
||||||
mBinaryBlob.alloc(sizeof(sTicketBody_v2));
|
mBinaryBlob.alloc(sizeof(sTicketBody_v2));
|
||||||
|
@ -364,3 +314,53 @@ void es::TicketBody_V2::setSectionEntrySize(uint16_t size)
|
||||||
{
|
{
|
||||||
mSectEntrySize = size;
|
mSectEntrySize = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool es::TicketBody_V2::isEqual(const TicketBody_V2 & other) const
|
||||||
|
{
|
||||||
|
return (mIssuer == other.mIssuer) \
|
||||||
|
&& (memcmp(mEncTitleKey, other.mEncTitleKey, ticket::kEncTitleKeySize) == 0) \
|
||||||
|
&& (mEncType == other.mEncType) \
|
||||||
|
&& (mTicketVersion == other.mTicketVersion) \
|
||||||
|
&& (mLicenseType == other.mLicenseType) \
|
||||||
|
&& (mPreInstall == other.mPreInstall) \
|
||||||
|
&& (mSharedTitle == other.mSharedTitle) \
|
||||||
|
&& (mAllowAllContent == other.mAllowAllContent) \
|
||||||
|
&& (memcmp(mReservedRegion, other.mReservedRegion, ticket::kReservedRegionSize) == 0) \
|
||||||
|
&& (mTicketId == other.mTicketId) \
|
||||||
|
&& (mDeviceId == other.mDeviceId) \
|
||||||
|
&& (memcmp(mRightsId, other.mRightsId, ticket::kRightsIdSize) == 0) \
|
||||||
|
&& (mAccountId == other.mAccountId) \
|
||||||
|
&& (mSectTotalSize == other.mSectTotalSize) \
|
||||||
|
&& (mSectHeaderOffset == other.mSectHeaderOffset) \
|
||||||
|
&& (mSectNum == other.mSectNum) \
|
||||||
|
&& (mSectEntrySize == other.mSectEntrySize);
|
||||||
|
}
|
||||||
|
|
||||||
|
void es::TicketBody_V2::copyFrom(const TicketBody_V2 & other)
|
||||||
|
{
|
||||||
|
if (other.getSize())
|
||||||
|
{
|
||||||
|
importBinary(other.getBytes(), other.getSize());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
clear();
|
||||||
|
mIssuer = other.mIssuer;
|
||||||
|
memcpy(mEncTitleKey, other.mEncTitleKey, ticket::kEncTitleKeySize);
|
||||||
|
mEncType = other.mEncType;
|
||||||
|
mTicketVersion = other.mTicketVersion;
|
||||||
|
mLicenseType = other.mLicenseType;
|
||||||
|
mPreInstall = other.mPreInstall;
|
||||||
|
mSharedTitle = other.mSharedTitle;
|
||||||
|
mAllowAllContent = other.mAllowAllContent;
|
||||||
|
memcpy(mReservedRegion, other.mReservedRegion, ticket::kReservedRegionSize);
|
||||||
|
mTicketId = other.mTicketId;
|
||||||
|
mDeviceId = other.mDeviceId;
|
||||||
|
memcpy(mRightsId, other.mRightsId, ticket::kRightsIdSize);
|
||||||
|
mAccountId = other.mAccountId;
|
||||||
|
mSectTotalSize = other.mSectTotalSize;
|
||||||
|
mSectHeaderOffset = other.mSectHeaderOffset;
|
||||||
|
mSectNum = other.mSectNum;
|
||||||
|
mSectEntrySize = other.mSectEntrySize;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue