Instead of the sha module use hashlib. This makes the minimum python version required 2.5 but that shouldn't be a problem these days.