added support for sha1 auto detection #4