Discussion:
"Emulate" Php Md5 (Crypt) and Sha1
Alvise Nicoletti
2007-07-03 13:17:39 UTC
Permalink
Hi to all... did anyone never heard how to implement crypt and sha1
functions of php inside delphi/lazarus?

My problem is the "salt" used in the crypt function, cause I'm already
able to create a md5 succesfully...

That is an example of code about them in php:
define ("CRYPT_MD5",1);
[...]
$c=crypt($pg,$s); // CRYPT DI pg in base a s
$code=sha1($TEXT.$DEST)
John Meyer
2007-07-03 13:33:43 UTC
Permalink
Post by Alvise Nicoletti
Hi to all... did anyone never heard how to implement crypt and sha1
functions of php inside delphi/lazarus?
While this isn't a cross-platform solution, have you tried the nix crypt
and sha functions?
Alvise Nicoletti
2007-07-03 13:40:20 UTC
Permalink
Post by John Meyer
Post by Alvise Nicoletti
Hi to all... did anyone never heard how to implement crypt and sha1
functions of php inside delphi/lazarus?
While this isn't a cross-platform solution, have you tried the nix crypt
and sha functions?
_________________________________________________________________
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives
Where I can find them? wich unit?

Maybe it's not a cross platform solution but I can do something with
their sources...
John Meyer
2007-07-03 13:57:55 UTC
Permalink
Post by Alvise Nicoletti
Post by John Meyer
Post by Alvise Nicoletti
Hi to all... did anyone never heard how to implement crypt and sha1
functions of php inside delphi/lazarus?
While this isn't a cross-platform solution, have you tried the nix crypt
and sha functions?
_________________________________________________________________
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives
Where I can find them? wich unit?
Maybe it's not a cross platform solution but I can do something with
their sources...
'crypt is implemented as a function in Linux/Unix. sha1 also has an
implementation for perl, so you might be able to do something with that.
Joao Morais
2007-07-03 13:57:29 UTC
Permalink
Post by Alvise Nicoletti
Hi to all... did anyone never heard how to implement crypt and sha1
functions of php inside delphi/lazarus?
My problem is the "salt" used in the crypt function, cause I'm already
able to create a md5 succesfully...
define ("CRYPT_MD5",1);
[...]
$c=crypt($pg,$s); // CRYPT DI pg in base a s
$code=sha1($TEXT.$DEST)
fpc has an md5 unit. Don't know about sha1, look for Delphi Encryption
Compendium.

--
Joao Morais
Loading...