Util function for SHA-1 computation using java Message Digest