code: function hashJson(data, algorithm) {
      return Q.Promise(function (resolve, reject) {
          try {
              resolve(hashJsonSync(data, algorithm));
          }
          catch (error) {
              reject(error);
          }
      });
  }
docs: computes a hash of some JSON object synchronously.
  
  @param data to hash.
  @param algorithm of choice.
  @return hash value.
  
  @internal Not part of public API, exported for library use only.