title: How to hash a set of integers, such that we can use the hash to test if a given integer was in the original set?
body: <p>Suppose we have a set of integers. Is there a way to hash them into a single value such that, using only the hash, we can test if a given number was in the original set? </p>
  
  <p>What I after is a sort of zero knowledge proof where I can prove a number belonged to the original set without knowing what the original set was.</p>
  
  <pre class="lang-cs prettyprint-override"><code>// hash a set of integers 
  int Hash(Set&lt;int&gt; values) { ... }
  
  // return true, iff n was in the 
  // original set that formed the hash
  int Test(int hash, int n) { ... }
  
  // given a set of integers..
  Set&lt;int&gt; theSet = {1,4,5,7};
  
  // is it possible to create a "hash"..
  int theHash = Hash(theSet);    
  
  // such that, using only the hash, we can test 
  // if a number was in the original set?
  AssertTrue(Test(theHash, 4));
  AssertFalse(Test(theHash, 6));
  </code></pre>