libctr9
Nintendo 3DS ARM9 library
Main Page
Data Structures
Files
File List
Globals
sha.h
1
#pragma once
2
3
#include <stdint.h>
4
5
#ifdef __cplusplus
6
extern
"C"
{
7
#endif
8
9
#define REG_SHACNT ((volatile uint32_t*)0x1000A000)
10
#define REG_SHABLKCNT ((volatile uint32_t*)0x1000A004)
11
#define REG_SHAHASH ((volatile uint32_t*)0x1000A040)
12
#define REG_SHAINFIFO ((volatile uint32_t*)0x1000A080)
13
14
#define SHA_CNT_STATE 0x00000003u
15
#define SHA_CNT_OUTPUT_ENDIAN 0x00000008u
16
#define SHA_CNT_MODE 0x00000030u
17
#define SHA_CNT_ENABLE 0x00010000u
18
#define SHA_CNT_ACTIVE 0x00020000u
19
20
#define SHA_HASH_READY 0x00000000u
21
#define SHA_NORMAL_ROUND 0x00000001u
22
#define SHA_FINAL_ROUND 0x00000002u
23
24
#define SHA256_MODE 0
25
#define SHA224_MODE 0x00000010u
26
#define SHA1_MODE 0x00000020u
27
28
void
sha_init(uint32_t mode);
29
void
sha_update(
const
void
* src, uint32_t size);
30
void
sha_get(
void
* res);
31
32
#ifdef __cplusplus
33
}
34
#endif
35
include
ctr9
sha.h
Generated by
1.8.11