Skip to content

Instantly share code, notes, and snippets.

@gleicon
Created April 3, 2010 11:42
Show Gist options
  • Save gleicon/354410 to your computer and use it in GitHub Desktop.
Save gleicon/354410 to your computer and use it in GitHub Desktop.
;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