title: generating coupon code
body: <p>I have five fields</p>
  
  <p>1.CustomerID</p>
  
  <p>2.BusinessID</p>
  
  <p>3.OfferID</p>
  
  <p>4.Day of Purchase</p>
  
  <p>5.Month Of Purchase</p>
  
  <pre><code>Private Function MakeCouponCode(ByVal sn As Int16) As String
          Dim a(16) As Char
          Dim chk As Int16
          Dim check, tDate, slNo, couponCode As String
  
          '..............................setting customerID
          If HFCustID.Value.Length = 1 Then
              HFCustID.Value = "00" &amp; HFCustID.Value
          ElseIf HFCustID.Value.Length = 2 Then
              HFCustID.Value = "0" &amp; HFCustID.Value
          End If
  
          '..............................setting businessID
          If HFBusiID.Value.Length = 1 Then
              HFBusiID.Value = "0" &amp; HFBusiID.Value
          End If
  
          '..............................setting offerID
          If HFOfferID.Value.Length = 1 Then
              HFOfferID.Value = "0" &amp; HFOfferID.Value
          End If
  
          '..............................setting todays date as ddmm
          If Today.Day.ToString.Length = 1 Then
              tDate = "0" &amp; Today.Day.ToString
          Else
              tDate = Today.Day.ToString
          End If
          If Today.Month.ToString.Length = 1 Then
              tDate = tDate &amp; "0" &amp; Today.Month.ToString
          Else
              tDate = tDate &amp; Today.Month.ToString
          End If
  
          '...............................calculating and setting the check digits
          If sn &lt; 10 Then
              slNo = "0" &amp; Convert.ToString(sn)
          Else
              slNo = Convert.ToString(sn)
          End If
  
          '...............................calculating and setting the check digits
          chk = Convert.ToInt16(HFCustID.Value) + Convert.ToInt16(HFCustID.Value) + Convert.ToInt16(HFOfferID.Value) + Today.Day + Today.Month + sn
          check = Convert.ToString(chk)
          If check.Length = 1 Then
              check = "00" &amp; check
          ElseIf check.Length = 2 Then
              check = "0" &amp; check
          End If
  
          '...............................concatenate all for coupon code
          couponCode = HFCustID.Value &amp; HFBusiID.Value &amp; HFOfferID.Value &amp; tDate &amp; slNo &amp; check
          Return couponCode
      End Function
  </code></pre>
  
  <p>I am using the above code to make a CouponCode...but somehow its not very hard to crack...Any idea how can i make a bullet proof coupon code in not more than 16 digits????</p>