-2

I am currently developing a PHP application that will get locations within a certain distance of a user's coordinates. I would like to store these coordinates in a session so that they don't have to enter their location over and over. I was thinking if someone got a hold of a person's session info, it might be bad if they could see the actual coordinates. Are there any good engines that can encrypt data for storage and can then decrypt the data later and is easy to use?

ShoeLace1291
  • 4,551
  • 12
  • 45
  • 81

1 Answers1

-1

I would use: http://php.net/manual/en/function.mcrypt-encrypt.php

I removed previous details due to their moronic nature

Architect Nate
  • 674
  • 1
  • 6
  • 21
  • 2
    I don't mean to offend you, really, but ... Please don't give advise about cryptography to anybody, it's obvious that you don't know what you're talking about. – Narf Feb 05 '16 at 09:34
  • 3
    To clarify: Encryption keys are supposed to be secret and unpredictable (user IDs or names are neither), and are also not ASCII strings with arbitrary lengh. – Narf Feb 05 '16 at 09:37
  • This is very true, i obviously wasn't thinking. I for some reason was thinking the encryption key should be unique per user. But that really isnt necessary. – Architect Nate Feb 05 '16 at 09:38
  • I would be very preferable to have unique keys per user, but that still leaves the problem of where to store that key in a way that's *secret* and not easily retrieved with the user data itself. – deceze Feb 05 '16 at 09:44