diff --git a/include/twl/os/common/systemCall.h b/include/twl/os/common/systemCall.h index 608264c..ab10f6d 100644 --- a/include/twl/os/common/systemCall.h +++ b/include/twl/os/common/systemCall.h @@ -17,6 +17,8 @@ #ifndef TWL_OS_SYSTEMCALL_H_ #define TWL_OS_SYSTEMCALL_H_ +#define SVC_SHA1_BLOCK_SIZE 64 +#define SVC_SHA1_DIGEST_SIZE 20 #ifdef __cplusplus extern "C" { @@ -40,6 +42,14 @@ typedef struct SVCSHA1Context } SVCSHA1Context; +typedef struct SVCHMACSHA1Context +{ + SVCSHA1Context sha1_ctx; + u8 key[SVC_SHA1_BLOCK_SIZE]; + u32 keylen; +} +SVCHMACSHA1Context; + typedef struct { void* output; @@ -97,18 +107,22 @@ int SVC_RandomSHA1( unsigned int src_len // 入力データの長さ ); -int SVC_UncompressLZ8FromDevice( const void* srcp, +s32 SVC_UncompressLZ8FromDevice( const void* srcp, void* destp, const void* paramp, const MIReadStreamCallbacks *callbacks ); -int SVC_UncompressLZ16FromDeviceIMG( const void* srcp, +s32 SVC_UncompressLZ16FromDeviceIMG( const void* srcp, void* destp, const void* paramp, const MIReadStreamCallbacks *callbacks ); +void SVC_HMACSHA1Init( SVCHMACSHA1Context *ctx, const void *key, u32 keylen ); +void SVC_HMACSHA1Update( SVCHMACSHA1Context *ctx, const void *data, u32 len ); +void SVC_HMACSHA1GetHash( SVCHMACSHA1Context *ctx, u8* md ); +void SVC_CalcHMACSHA1( void* md, const void* data, u32 len, void* key, u32 keylen ); #ifdef __cplusplus diff --git a/lib/ARM7-TS/etc/libsyscall_sp.twl.a b/lib/ARM7-TS/etc/libsyscall_sp.twl.a index 5ae53a5..3c350aa 100644 Binary files a/lib/ARM7-TS/etc/libsyscall_sp.twl.a and b/lib/ARM7-TS/etc/libsyscall_sp.twl.a differ diff --git a/lib/ARM9-TS/etc/libsyscall.twl.a b/lib/ARM9-TS/etc/libsyscall.twl.a index 5ae53a5..fb6689d 100644 Binary files a/lib/ARM9-TS/etc/libsyscall.twl.a and b/lib/ARM9-TS/etc/libsyscall.twl.a differ