Created
April 3, 2010 11:42
-
-
Save gleicon/354410 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;fix over http://snippets.dzone.com/posts/show/2816 so it can run on Mac OS | |
; also, it serves as an elegant reminder on how to use external libraries :) | |
(setq SHA1 (import "libssl.dylib" "SHA1")) | |
(join (map (lambda (x) (format "%02x" (& x 0xff))) (unpack (dup "c" 20) (get-string (SHA1 "abc" 3 0))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment