Changed sha digest to hexdigest to avoid unicode incompatibility