Refactor [md5], [hmac_md5], [sha1], [hmac_sha1]