Someone has queried me to see if they can use their customers credit card numbers as membership numbers.
So looking up the PCI requirements for storing credit card numbers it says that a one way hash of the credit card number is required. Page 38 - https://www.pcisecuritystandards.org/documents/PCI_DSS_v3.pdf
It doesn't however say what hashes are acceptable?
So really all I need to accomplish is to convert a card number into a membership number which will be a hashed credit card number.
What is the easiest hash to implement as I'm working with a proprietary scripting language.
Simple alternative: Use a persistent variable which is incremented every time a new membership number is required.
You can also use a random number, but then you have to ensure it hasn't been used.
Credit card numbers are not entirely random, meaning dictionary-based brute force attacks are easier than if fully random. And as mentioned in the comments, they change and could cause you legal trouble in terms of financial regulations.