From 7c1d3869d8cf4341acedbe7c662e8ac1ca935666 Mon Sep 17 00:00:00 2001 From: Egor Ananyin Date: Fri, 22 May 2020 19:46:43 +0300 Subject: Decompile libmath --- arm9/lib/include/dgt.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 arm9/lib/include/dgt.h (limited to 'arm9/lib/include/dgt.h') diff --git a/arm9/lib/include/dgt.h b/arm9/lib/include/dgt.h new file mode 100644 index 00000000..5e63f3f7 --- /dev/null +++ b/arm9/lib/include/dgt.h @@ -0,0 +1,30 @@ +#ifndef GUARD_DGT_H +#define GUARD_DGT_H + +#include "types.h" + +struct DGTHash1Context { + union { + struct { + unsigned long a, b, c, d; + }; + unsigned long state[4]; + }; + unsigned long long length; + union { + unsigned long buffer32[16]; + unsigned char buffer8[64]; + }; +}; + +struct DGTHash2Context { + unsigned long Intermediate_Hash[5]; + unsigned long Length_Low; + unsigned long Length_High; + int Message_Block_Index; + unsigned char Message_Block[64]; + int Computed; + int Corrupted; +}; + +#endif -- cgit v1.2.3 From 936ea8a0134ed8095f9496ebe1571866509530d7 Mon Sep 17 00:00:00 2001 From: Egor Ananyin Date: Sat, 23 May 2020 09:22:31 +0300 Subject: Rename header files to avoid confusion --- arm9/lib/include/dgt.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'arm9/lib/include/dgt.h') diff --git a/arm9/lib/include/dgt.h b/arm9/lib/include/dgt.h index 5e63f3f7..a764e85a 100644 --- a/arm9/lib/include/dgt.h +++ b/arm9/lib/include/dgt.h @@ -27,4 +27,11 @@ struct DGTHash2Context { int Corrupted; }; +void DGT_Hash1Reset(struct DGTHash1Context *context); +void DGT_Hash1SetSource(struct DGTHash1Context *context, u8 *input, u32 length); +void DGT_Hash1GetDigest_R(u8 *digest, struct DGTHash1Context *context); +void DGT_Hash2Reset(struct DGTHash2Context *context); +void DGT_Hash2SetSource(struct DGTHash2Context *context, u8 *input, u32 length); +void DGT_Hash2GetDigest(struct DGTHash2Context *context, u8 *digest); + #endif -- cgit v1.2.3