Jump to content

Custom PHP Extensions?


Markh789

Recommended Posts

Ok, Well I'm big around security and im trying in place the following code into the extension file.

 

function dllencrypt($str) {

  $str = sha1(md5(base64_encde($str . $str)));

  $str  = str_replace($str, "a", "b");

  $str  = str_replace($str, "c", "k");

  $str  = str_replace($str, "d", "r");

 

  return $str;

}

 

Yeah, basically its just a little encryption (Though there is another one that dose the same thing about 20 times) that I will be removing MD5 and designing it all by myself, this is just for testing.

 

How can I place this inside of the extension file?

True....  I guess the only way really would be if you could make PHP a library, then rebuild PHP, with the non-C extension built against the library version of PHP.  Hrmmmm....

 

So, it probably is possible in the long run, but after DarkWater's comment, I would venture to say you could just learn C 500 times before you would get it to work.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.