views:

80

answers:

3

i need to encrypt some data but i guess mcrypt library is not native in php right? is there a secure and native alternative?

obs: i created my own solution but the performance wasn't good =/

+1  A: 

There's a PHP library for Mcrypt. The documentation is here. It should already be installed. If it isn't there are instructions in the documentation on how to install it.

lyoshenka
so mcrypt library is a native one?
hugo_leonardo
Why do you care? Is it too slow?
GregS
What do you mean by 'native'? The mcrypt library comes with PHP, but is not compiled directly into the interpreter. If you are looking for the "made by PHP" solution, then use the library. If you can't use the library for some reason, then you'll have to recompile PHP and include mcrypt.
lyoshenka
okay. it's just that i use to host my apps with third party services. wich i don't control the server. but thank you. helped so much ^^
hugo_leonardo
@GregSand yes, it is VERY slow. about 20 times slower than mcrypt. and this with a very short string. the wasted time rises in a PG. not acceptable =p
hugo_leonardo
A: 

The only native solution is the native solutions :/ You have to compile PHP for it. Alternatively, you could write your own solution in C and use it as an extension. I'm pretty sure those are you only options.

threendib
A: 

mcrypt

mcrypt support enabled Version 2.5.8 Api No 20021217 Supported ciphers cast-128 gost rijndael-128 twofish arcfour cast-256 loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 tripledes Supported modes cbc cfb ctr ecb ncfb nofb ofb stream

Directive Local Value Master Value mcrypt.algorithms_dir no value no value mcrypt.modes_dir no value no value

hopeseekr
did you just copy paste your phpinfo? .-.
hugo_leonardo