mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-31 23:08:22 -04:00
fs: add Sha256HashGenerator, LZ4 decompressor
This commit is contained in:
parent
a2aec363d7
commit
01f7f567b9
11 changed files with 165 additions and 8 deletions
|
@ -39,7 +39,7 @@ namespace ams::crypto::impl {
|
|||
private:
|
||||
State m_state;
|
||||
public:
|
||||
Sha1Impl() { /* ... */ }
|
||||
Sha1Impl() { m_state.finalized = false; }
|
||||
~Sha1Impl() {
|
||||
static_assert(std::is_trivially_destructible<State>::value);
|
||||
ClearMemory(std::addressof(m_state), sizeof(m_state));
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace ams::crypto::impl {
|
|||
private:
|
||||
State m_state;
|
||||
public:
|
||||
Sha256Impl() { /* ... */ }
|
||||
Sha256Impl() { m_state.finalized = false; }
|
||||
~Sha256Impl() {
|
||||
static_assert(std::is_trivially_destructible<State>::value);
|
||||
ClearMemory(std::addressof(m_state), sizeof(m_state));
|
||||
|
|
|
@ -284,9 +284,12 @@ namespace ams::fs {
|
|||
R_DEFINE_ERROR_RESULT(GameCardLogoDataCorrupted, 4781);
|
||||
|
||||
R_DEFINE_ERROR_RANGE(Unexpected, 5000, 5999);
|
||||
R_DEFINE_ERROR_RESULT(UnexpectedInAesCtrStorageA, 5315);
|
||||
R_DEFINE_ERROR_RESULT(UnexpectedInAesXtsStorageA, 5316);
|
||||
R_DEFINE_ERROR_RESULT(UnexpectedInFindFileSystemA, 5319);
|
||||
R_DEFINE_ERROR_RESULT(UnexpectedInAesCtrStorageA, 5315);
|
||||
R_DEFINE_ERROR_RESULT(UnexpectedInAesXtsStorageA, 5316);
|
||||
R_DEFINE_ERROR_RESULT(UnexpectedInFindFileSystemA, 5319);
|
||||
R_DEFINE_ERROR_RESULT(UnexpectedInCompressedStorageA, 5324);
|
||||
R_DEFINE_ERROR_RESULT(UnexpectedInCompressedStorageB, 5325);
|
||||
R_DEFINE_ERROR_RESULT(UnexpectedInCompressedStorageC, 5326);
|
||||
|
||||
R_DEFINE_ERROR_RANGE(PreconditionViolation, 6000, 6499);
|
||||
R_DEFINE_ERROR_RANGE(InvalidArgument, 6001, 6199);
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
namespace ams::crypto::impl {
|
||||
|
||||
|
||||
/* Variable management macros. */
|
||||
#define DECLARE_ROUND_KEY_VAR(n) \
|
||||
const uint8x16_t round_key_##n = vld1q_u8(keys + (BlockSize * n))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue