Calculating SHA-1 digests with AppleScript
This snippet calculates the SHA-1 digest of a string:
set s to "mailto:richard@cyganiak.de"
do shell script "echo -n " & quoted form of s & "|openssl sha1"
set digest to result
This is useful for calculating foaf:mbox_sha1sum values, for example.