-2

How can I encode string using PHP Base64_encode function with passing some Salt String

I don't want others to hack my string. If some one is having little knowledge in php, he can easily hack if I directly encode string. Because this is the only function allow you to decode encoded content. As far as I know.

In the tutorials I see above function will accept only one parameter.

Any Help ?

Sahal
  • 3,890
  • 14
  • 38
  • 65
  • 1
    If you want to *properly* encrypt a string, don't use base64. Use a proper encryption method instead – Pekka Sep 08 '11 at 08:01
  • What method you are talking about ? – Sahal Sep 08 '11 at 08:02
  • 3
    possible duplicate of [Best way to use PHP to encrypt and decrypt?](http://stackoverflow.com/questions/1289061/best-way-to-use-php-to-encrypt-and-decrypt) – Pekka Sep 08 '11 at 08:04

1 Answers1

4

You should use mcrypt php extension.

Gedrox
  • 3,512
  • 1
  • 19
  • 29