implementation of md5 and sha1 with javascript