Coder
Coder

Reputation: 339

Encrypt URI string Codeigniter using URI or Router

I have url : http://localhost/auth/123?org=12&use_id=12 i need to encrypt after "?" auto using core/router or core/URI. any idea how can i do it.

Thanks in advance.

Upvotes: 0

Views: 217

Answers (1)

Scott Arciszewski
Scott Arciszewski

Reputation: 34093

You're trying to solve the wrong problem.

Encrypting URI parameters is almost never the solution you want.

You want to use HTTPS (HTTP over TLS) to encrypt your parameters to protect them in transit.

If you want to obfuscate them from your users, encryption isn't the tool you want here.

Don't Do This:

encrypt URL parameters

Do This Instead:

use a lookup instead

If you re-think how you architect your software, and develop a threat model, you'll arrive at a better solution than what you were asking for.

Upvotes: 1

Related Questions