Announcement

Collapse
No announcement yet.

How to Encrypt string ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • How to Encrypt string ?

    Hi

    Do you know any function that encrypt a string with key and allow the encrypted string to be decrypt by the same key of course (not hashing) ?

    What I want is something easy to use.

    Thanks

  • #2
    How about mcrypt?
    What encryption function you want to use really depends on what you want to use it for, though
    <@Bane>Go on baby, be kinky and talk to me in PHP.

    I recommend MBSHost to all my clients
    PHP scripts I'm working on
    My favourite search engine

    Comment


    • #3
      "This is an interface to the mcrypt library" and need to install it in the server. Is there any built-in function.

      I want to send some information from one server to another, the sensitive values is encrypted like password, but I want to encrypt all the variable and its value and then send it (to increase the security)
      Thanks Koobi

      Comment


      • #4
        http://uk.php.net/md5

        This is 'hash' and not encrypt, so you can't decrypt it, but it is great for adding security.

        Comment


        • #5
          Thnks Floris, yes we can not decrypt hash, so MD5 didn't help me

          Comment


          • #6
            I personally would use a database for this kind of things...
            Normally, only the admin should be able to access phpmyadmin/sql console..

            a row with the "encrypted" text (well, it's plaintext in the database) and another one with the password to decrypt/access it (why not md5 it )
            Syntax errors in my post ? Well, I'm a french-speaking Swiss user..

            Comment


            • #7
              Originally posted by Floris
              http://uk.php.net/md5

              This is 'hash' and not encrypt, so you can't decrypt it,
              That's what I thought until someone told me that there's a tool (ugh, another one of those tools) out there that lets you retrieve the original data of the hash. Of course this isn't legal but if someone want's to mess with your data, they wouldn't care about legality issues.
              <@Bane>Go on baby, be kinky and talk to me in PHP.

              I recommend MBSHost to all my clients
              PHP scripts I'm working on
              My favourite search engine

              Comment


              • #8
                Originally posted by Koobi
                That's what I thought until someone told me that there's a tool (ugh, another one of those tools) out there that lets you retrieve the original data of the hash. Of course this isn't legal but if someone want's to mess with your data, they wouldn't care about legality issues.
                Yes that's true. I tried that with my own password but it took me ages.
                That's the end of that!

                Comment


                • #9
                  Originally posted by Koobi
                  That's what I thought until someone told me that there's a tool (ugh, another one of those tools) out there that lets you retrieve the original data of the hash. Of course this isn't legal but if someone want's to mess with your data, they wouldn't care about legality issues.
                  But that isn't decrypting, thats cracking. There is no reverse algorithm for a hash as there is for an encryption.

                  Comment


                  • #10
                    Originally posted by Chroder
                    But that isn't decrypting, thats cracking. There is no reverse algorithm for a hash as there is for an encryption.
                    Yeah, that it is. Sorry, terminology mess up heh heh
                    I just wanted to let Mansour know that MD5 is not really safe either unfortunately
                    <@Bane>Go on baby, be kinky and talk to me in PHP.

                    I recommend MBSHost to all my clients
                    PHP scripts I'm working on
                    My favourite search engine

                    Comment


                    • #11
                      Its nearly impossible to get the exact data from an MD5 hash, if you really want to hash that data securly take a look at how vBulletin does it

                      Comment

                      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                      Working...
                      X
                      😀
                      🥰
                      🤢
                      😎
                      😡
                      👍
                      👎