Both of these were deprecated in 55f675811a1b915549933c64571fd86b2676ba76 (https://github.com/opencontainers/go-digest/pull/33), but the format of the GoDoc comments didn't follow the correct format, which causes them not being picked up by tools as "deprecated".
This patch:
Fixes the comments to be in the right format.
Updates uses in the codebase to use the alternatives.
Both of these were deprecated in 55f675811a1b915549933c64571fd86b2676ba76 (https://github.com/opencontainers/go-digest/pull/33), but the format of the GoDoc comments didn't follow the correct format, which causes them not being picked up by tools as "deprecated".
This patch:
Also gofmt'd the code (first commit)