Hi DaniWeb users.

I am creating a mp3 shop cart script, and I need a function to create a unique id of multiple items in the cart.

for example in cart are these id's: 1,6,21,5
base64 would make this: MSw2LDIxLDU=

I need it only alphanumeric as it is ment to be sent from a sms!

So when the user sents the sms, my server needs to "decode" it and get the cart items user 'purchased' from with a sms!

Recommended Answers

All 2 Replies

Hey.

Hahses are by definition one-way, so using those in situations where decoding the data again is needed is not possible. (Or at least not practical.)

You say you need it to be an alphanumeric string, but do you need to to be encrypted?

If not, you could just send the ID's, as they are, separated by a random letter. Then you could just explode() them on the other end.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.