artifact: add image.CalcHash() function

Prior to this commit, the only way to calculate an image's hash was to
use image.calcHash() (in `artifact/image/create.go`).  This function is
private to the `image` package, and it takes a set of parameters that
are is not convenient for most cases.

This commit adds a new public function to the `image.Image` type:
```
func (i *Image) CalcHash() ([]byte, error)
```
1 file changed
tree: ede1a7837d5bdb1f89db5e74d7b02aabcf554ed0
  1. flash/
  2. image/
  3. manifest/
  4. mfg/
  5. misc/
  6. sec/