September Morn Update

This commit is contained in:
Ingy döt Net 2019-09-12 10:33:56 -07:00
parent 4e2d22a71d
commit aac6731f2c
6856 changed files with 141342 additions and 21127 deletions

View file

@ -1,4 +1,4 @@
module md5_m
module md5_mod
use kernel32
use advapi32
implicit none
@ -40,7 +40,7 @@ contains
end if
do
status = ReadFile(hFile, loc(buffer), BUFLEN, loc(nRead), NULL)
status = ReadFile(hFile, loc(buffer), BUFLEN, nRead, NULL)
if (status == FALSE .or. nRead == 0) exit
filesize = filesize + nRead
if (CryptHashData(hHash, buffer, nRead, 0) == FALSE) then
@ -69,7 +69,7 @@ contains
end module
program md5
use md5_m
use md5_mod
implicit none
integer :: n, m, i, j
character(:), allocatable :: name

14
Task/MD5/Neko/md5.neko Normal file
View file

@ -0,0 +1,14 @@
/**
MD5 in Neko
Tectonics:
nekoc md5.neko
neko md5
*/
var MD5 = $loader.loadprim("std@make_md5", 1);
var base_encode = $loader.loadprim("std@base_encode", 2);
var result = MD5("The quick brown fox jumps over the lazy dog");
/* Output in lowercase hex */
$print(base_encode(result, "0123456789abcdef"));

View file

@ -1,2 +1,6 @@
UseMD5Fingerprint() ; register the MD5 fingerprint plugin
test$ = "The quick brown fox jumped over the lazy dog's back"
Debug MD5Fingerprint(@test$, StringByteLength(test$))
; Call StringFingerprint() function and display MD5 result in Debug window
Debug StringFingerprint(test$, #PB_Cipher_MD5)