summaryrefslogtreecommitdiff
path: root/arm9/lib/NitroSDK/include/dgt.h
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2021-07-25 13:23:02 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2021-07-25 13:23:02 -0400
commit5e0e326b75402a36c4d31502b8b5a05b862ac23c (patch)
tree1b5807c1efb72dbdd9d01f329cefb41171913a64 /arm9/lib/NitroSDK/include/dgt.h
parent1f9d4503c898f9138422215132b53224571a281a (diff)
parent68d7aa47cc52ef822220e0e35890863d7cad479f (diff)
Merge remote-tracking branch 'origin/master' into pikalax_work
Diffstat (limited to 'arm9/lib/NitroSDK/include/dgt.h')
-rw-r--r--arm9/lib/NitroSDK/include/dgt.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/arm9/lib/NitroSDK/include/dgt.h b/arm9/lib/NitroSDK/include/dgt.h
new file mode 100644
index 00000000..97916f1b
--- /dev/null
+++ b/arm9/lib/NitroSDK/include/dgt.h
@@ -0,0 +1,37 @@
+#ifndef GUARD_DGT_H
+#define GUARD_DGT_H
+
+#include "nitro/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;
+};
+
+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