A2osX/SYS/KERNEL.S.MD5.txt

70 lines
1.4 KiB
Plaintext
Raw Normal View History

2020-01-24 07:00:30 +00:00
NEW
AUTO 3,1
*/--------------------------------------
* ## MD5
* Return MD5 Hash for input String
* # C
* `void md5 (const char* str, char* digest);`
* # ASM
* `>PUSHW str`
* `>PUSHW digest`
* `>SYSCALL md5`
* ## RETURN VALUE
* CC
*\--------------------------------------
2023-11-12 13:20:15 +00:00
K.MD5 .EQ JMP.X2
2021-05-09 12:39:40 +00:00
* >PULLW FORPNT
* >PULLW TXTPTR
2020-01-24 07:00:30 +00:00
*/--------------------------------------
* ## MD5Init
* Initialize a MD5 computation
* # C
* `short int md5init();`
2020-01-24 07:00:30 +00:00
* # ASM
* `>SYSCALL MD5Init`
* ## RETURN VALUE
* A = hMem To S.MD5
*\--------------------------------------
2023-11-12 13:20:15 +00:00
K.MD5Init .EQ JMP.X
2021-05-09 12:39:40 +00:00
2023-11-12 13:20:15 +00:00
* jmp JMP.X
2020-01-24 07:00:30 +00:00
*/--------------------------------------
* ## MD5Update
* Add Data to MD5 computation
* # C
2020-01-24 14:21:08 +00:00
* `void md5update (short int md5, char* data, int len);`
2020-01-24 07:00:30 +00:00
* # ASM
* `>PUSHB md5`
* `>PUSHW data`
* `>PUSHW len`
* `>SYSCALL MD5Update`
* ## RETURN VALUE
*\--------------------------------------
2023-11-12 13:20:15 +00:00
K.MD5Update .EQ JMP.X2A
2021-05-09 12:39:40 +00:00
* >PULLW FORPNT get LEN
* >PULLW TXTPTR get DATA
* >PULLA
2020-01-24 07:00:30 +00:00
2023-11-12 13:20:15 +00:00
* jmp JMP.X
2020-01-24 07:00:30 +00:00
*/--------------------------------------
* ## MD5Finalize
* # C
2020-01-24 14:21:08 +00:00
* `void md5finalize (short int md5, char* digest);`
2020-01-24 07:00:30 +00:00
* # ASM
* `>PUSHB md5`
* `>PUSHW digest`
* `>SYSCALL MD5Finalize`
* ## RETURN VALUE
*\--------------------------------------
2023-11-12 13:20:15 +00:00
K.MD5Finalize .EQ JMP.X1A
* >PULLW FORPNT
* >PULLA
2020-01-24 07:00:30 +00:00
2023-11-12 13:20:15 +00:00
* jmp JMP.X
2020-01-24 07:00:30 +00:00
*--------------------------------------
MAN
2020-12-15 13:23:22 +00:00
SAVE usr/src/sys/kernel.s.md5
LOAD usr/src/sys/kernel.s
2020-01-24 07:00:30 +00:00
ASM