title: ASP.NET convert string to pre-defined length string
body: <p>Here at work we are converting over to a new payment system which allows only a maximum of 7 characters in the product code. The product codes we are using can and will excede 7 characters (changing would require changing past orders so changing the codes is out of the question). </p>
  
  <p>The product code for us is the event code (ie ccsws2011), the old system allowed us to pass the entire event code in, whereas the new system is limiting us to only 7 characters. I do not want to do a look up table at all. I want to be able to create a product code list for the system (outside the website) and then have the code within the website automatically convert our event code to the product code I created outside the website and pass it to the payment system.</p>
  
  <p>Is there a way to hash our product code into a 7 character product code for the new system? </p>
  
  <p>I.E.:</p>
  
  <p>our product code: ccsws2011
  Hashed product code: xxxxxxx</p>