code: func CalculatePin(ctx context.Context, body io.ReadSeeker, algo api.HashAlgo) (common.Pin, error) {
  	inst, err := OpenInstance(ctx, noopCloserSrc{body}, OpenInstanceOpts{
  		VerificationMode: CalculateHash,
  		HashAlgo:         algo,
  	})
  	if err != nil {
  		return common.Pin{}, err
  	}
  	defer inst.Close(ctx, false)
  	return inst.Pin(), nil
  }
docs: // CalculatePin returns a pin that represents the package.
  //
  // It reads the package name from the manifest inside, and calculates package's
  // hash to get instance ID.