Hi all,
sorry, please forget what I wrote yesterday:
> (load "lib/native.l")
>
> (gcc "openssl" '("-lssl" "-lcrypto")
> (md5 (Str) "md5" '(B . 16) Str) )
> ...
> : (mapcar hex (md5 "The quick brown fox jumped over the lazy dog's back"))
> -> ("E3" "8C" "A1" "D9" "20" "C4" "B8" "B8" "D3" "94" "6B" "2C" "72" "F0"
> "16" "80")
There is no need for inline C-code, calling 'gcc' etc., as the 'native'
function can handle this directly:
(let Str "The quick brown fox jumped over the lazy dog's back"
(mapcar hex
(native "libcrypto.so" "MD5" '(B . 16) Str (length Str) '(NIL (16))) ) )
-> ("E3" "8C" "A1" "D9" "20" "C4" "B8" "B8" "D3" "94" "6B" "2C" "72" "F0" "16"
"80")
Cheers,
- Alex
--
UNSUBSCRIBE: mailto:[email protected]?subject=unsubscribe