forked from WiiLink24/AccountLinker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathotp.h
More file actions
28 lines (24 loc) · 715 Bytes
/
Copy pathotp.h
File metadata and controls
28 lines (24 loc) · 715 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#pragma once
// Thank you to thepikachugamer for this OTP code from their nanddumper
// https://github.com/Naim2000/nanddumper_ios/blob/master/source/otp.h
#include <stdint.h>
#define OTP_WORD_COUNT 32
typedef union {
struct {
uint32_t boot1_hash[5];
uint32_t common_key[4];
uint32_t device_id;
union {
uint8_t device_private_key[30];
struct {
uint32_t pad[7];
uint32_t nandfs_hmac_key[5];
};
};
uint32_t nandfs_key[4];
uint32_t backup_key[4];
uint32_t pad2[2];
};
uint32_t data[OTP_WORD_COUNT];
} WiiOTP;
int otp_read(unsigned offset, unsigned count, uint32_t* out);