exo2: Implement (untested) SmcDecryptDeviceUniqueData
This commit is contained in:
@@ -30,16 +30,24 @@ namespace ams::crypto::impl {
|
||||
static constexpr s32 RoundCount = (KeySize / 4) + 6;
|
||||
static constexpr size_t RoundKeySize = BlockSize * (RoundCount + 1);
|
||||
private:
|
||||
#ifdef ATMOSPHERE_IS_EXOSPHERE
|
||||
int slot;
|
||||
#endif
|
||||
#ifdef ATMOSPHERE_IS_STRATOSPHERE
|
||||
u32 round_keys[RoundKeySize / sizeof(u32)];
|
||||
#endif
|
||||
public:
|
||||
~AesImpl();
|
||||
|
||||
void Initialize(const void *key, size_t key_size, bool is_encrypt);
|
||||
void EncryptBlock(void *dst, size_t dst_size, const void *src, size_t src_size) const;
|
||||
void DecryptBlock(void *dst, size_t dst_size, const void *src, size_t src_size) const;
|
||||
|
||||
#ifdef ATMOSPHERE_IS_STRATOSPHERE
|
||||
const u8 *GetRoundKey() const {
|
||||
return reinterpret_cast<const u8 *>(this->round_keys);
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
/* static_assert(HashFunction<Sha1Impl>); */
|
||||
|
||||
Reference in New Issue
Block a user