docs: function digestFromManifestStr(manifestStr) {
      assert.string(manifestStr, 'manifestStr');
  
      var hash = crypto.createHash('sha256');
      var digestPrefix = 'sha256:';
  
      var manifest;
      try {
          manifest = JSON.parse(manifestStr);
      } catch (err) {
          throw new restifyErrors.InvalidContentError(err, fmt(
              'could not parse manifest: %s', manifestStr));
      }
      if (manifest.schemaVersion === 1) {
          try {
              var manifestBuffer = Buffer(manifestStr);
              var jws = _jwsFromManifest(manifest, manifestBuffer);
              hash.update(jws.payload, 'binary');
              return digestPrefix + hash.digest('hex');
          } catch (verifyErr) {
              if (!(verifyErr instanceof restifyErrors.InvalidContentError)) {
                  throw verifyErr;
              }
              // Couldn't parse (or doesn't have) the signatures section,
              // fall through.
          }
      }
      hash.update(manifestStr);
      return digestPrefix + hash.digest('hex');
  }