Hi!
I'd like to encrypt/decrypt some data in my mysql DB, but my host hasn't got the mcrypt libraries installed for php...
Are there any other way of doing it?

    Thanks for the link, the problem is that that is a hash, a one way encryption. I use hash to protect my users passwords in a member table, but what I need now is the ability to encrypt AND decrypt information. The mcrypt library looks like a "standard" way of doing this, but my free host hasn't installed the mcrypt library 🙁
    Any other ideas?

      Sounds interesting, I'm gonna look into it later today, maybe tomorrow. But when you say slow... How slow? 😉
      What I wanted is a internal messaging system for my community site, but I also wanted to encypt the messages, so I don't go snooping around in my users private messages 🙂
      Would your blowfishphp project work for this?

        You could make a simple Encyrption by converting each charecter into a number and adding 4 to it and then convert it to binary. It would be slow and highly crackable..

          use strtr for simple encryption...
          its sorta like using multiple cypers but less secure...

          example (using shortended charset)
          <PRE>
          $addr = "abc123";
          $addr1 = strtr($addr, "bcb321", "123abc");
          $addr2 = strtr($addr1, "123cab", "a1b2c3");
          $addr3 = strtr($addr2, "a1c2b3", "klmnwr");
          $addr4 = strtr($addr3, "kwnmlr", "pinqus");
          echo $addr4;
          </PRE>

          that will produce : qiunsq

          proving you run it through in the other direction to get the proper decrypt.. Im not sure how slow this is when using a full charset...

          Carl

            it's not my project...

            it's still in beta and not optimized for speed... but it's almost as good as encryption gets for a regular user...

            // | Notes: |
            // | Like other implementations, this code is not optimized for speed! |
            // | The slowest part of all is the initialisation with the key of the |
            // | sboxes, because Encipher() is called 4*256 in the Blowfish() |
            // | function. Some mini-tests showed the following function-runtime: |
            // | time useless machine description |
            // | --------- --------------------------------------------------------- |
            // | 7-8 secs PII-400 linux workstation under heavy load |
            // | 4-5 secs PIII-600 linux server |
            // | 4-5 secs webhosting provider (heavy load till up to12 secs!) |

              Write a Reply...