Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

3
Task/MD5/Ol/md5-1.ol Normal file
View file

@ -0,0 +1,3 @@
(import (otus ffi))
(define libcrypto (load-dynamic-library "libcrypto.so.1.0.0"))
(define MD5 (libcrypto type-vptr "MD5" type-string fft-unsigned-long type-string))

18
Task/MD5/Ol/md5-2.ol Normal file
View file

@ -0,0 +1,18 @@
(define (test str)
(define md5 "----------------")
(MD5 str (string-length str) md5)
(for-each display (list "\"" str "\": "))
(for-each (lambda (c)
(define hex "0123456789abcdef")
(display (string (ref hex (>> c 4))))
(display (string (ref hex (band c #x0F)))))
(string->list md5))
(print))
(test "")
(test "a")
(test "abc")
(test "message digest")
(test "abcdefghijklmnopqrstuvwxyz")
(test "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")
(test "12345678901234567890123456789012345678901234567890123456789012345678901234567890")