title: Storing partial credit card numbers
body: <p>Possible Duplicates:</p>
  
  <ol>
  <li><a href="https://stackoverflow.com/questions/1416721/best-practices-for-taking-and-storing-credit-card-information-with-php">Best practices for taking and storing credit card information with PHP</a></li>
  <li><a href="https://stackoverflow.com/questions/206438/storing-credit-card-details">Storing credit card details</a></li>
  <li><a href="https://stackoverflow.com/questions/633384/storing-credit-card-information">Storing Credit Card Information</a></li>
  </ol>
  
  <p>I need to store credit card numbers within an e-commerce site. I don't intend on storing the whole credit card number, as this would be highly risky. I would like to store at least the first five digits so I can later identify the financial institution that issued the card. Ideally, I would like to store as much of the credit number as I safely can, to aid any future cross-referencing etc.</p>
  
  <p><em>How many digits, and which particular digits, can I safely store?</em></p>
  
  <p>For example, I imagine this would not be safe enough:</p>
  
  <pre><code>5555 5555 555* 4444
  </code></pre>
  
  <p>Because you could calculate the missing digit.</p>
  
  <p>Similarly, this would be safe, but not be as useful:</p>
  
  <pre><code>5555 5*** **** ****
  </code></pre>
  
  <p><em>Is there a well accepted pattern for storing partial credit numbers?</em></p>