title: Checking serial code correctness
body: <p>I have a method in java which generates a serial code based on a number of parameters.</p>
  
  <p>Now I would like to have another method which accepts the same parameters + the serial code, and tells me whether or not this serial code is correct. However, I do not want to expose the serial code creation method, so if someone knows the method to check the correctness, he should not be able to construct a new code based on some other parameters.</p>
  
  <p>Is this possible?</p>
  
  <p>Some extra crucial information. I can't change the method which generates the serial code. Otherwise I could use some standerd public-private key algorithm. What I want is:</p>
  
  <pre><code>methodICannotChange("someinput") returns serialcode
  methodICanInvent(serialcode, "someinput") returns true or false
  </code></pre>
  
  <p>and in witch it is 'impossible' to generate a new serialcode when knowing the implementation of methodICanInvent.</p>