Calculate digests (hashes) of data from Swift