optimize hashdecrypt loop