diff options
author | PikalaxALT <pikalaxalt@gmail.com> | 2020-05-24 13:15:38 -0400 |
---|---|---|
committer | PikalaxALT <pikalaxalt@gmail.com> | 2020-05-24 13:15:38 -0400 |
commit | 5c996b8ce92c701b52ef54461578ef0459cf41e5 (patch) | |
tree | be59c9d09907955b8acd27e9bac54ed608e32747 /arm9/lib/include/dgt.h | |
parent | 14d27c8920d67c6c05b5e8baec08139c6db024e7 (diff) | |
parent | 5e9e45966d88aeba6c4c9fb9ef8b0df333381f54 (diff) |
Merge branch 'pikalax_work' of github.com:PikalaxALT/pokediamond into pikalax_work
Diffstat (limited to 'arm9/lib/include/dgt.h')
-rw-r--r-- | arm9/lib/include/dgt.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/arm9/lib/include/dgt.h b/arm9/lib/include/dgt.h new file mode 100644 index 00000000..a764e85a --- /dev/null +++ b/arm9/lib/include/dgt.h @@ -0,0 +1,37 @@ +#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; +}; + +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 |