[fpc-pascal]using crypt() in freepascal

Martyn Ranyard ranyardm at lineone.net
Wed Sep 4 13:57:56 CEST 2002


No doubt some of you were expecting this email after the discussions on 
user detail, but...

I tried to compile an application that uses the crypt() function, and found 
h2pas/h2paspp doesn't like my header files so I manually created the 
attached crypt_h.pp.

It's called crypt_h because otherwise the unit name and the function are 
the same.  Not good.

crypt_test.pp is just to test it, and is very basic, so please don't 
criticize it too much, thanks.

It compiled nicely on my Slackware 8 machine, and even encoded DES password 
hashes, as below :

String to encode : mranyard
Salt : mr
Encrypted : mrUQ7cwxVvScs

however, a second run attempting to create an MD5 password hash fails 
horribly and I have no ideas where to start :

String to encode : mranyard
Salt : $1$
Inconsistency detected by ld.so: dl-minimal.c: 114: realloc: Assertion `ptr 
== alloc_last_block' failed!

Any thoughts?


-
Martyn Ranyard
Free Software Advocate

jabber - joran at amessage.de
icq    - 122500800
irc    - Joran on oftc
msn    - ranyardm at hotmail.com
e      - ranyardm at lineone.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: crypt_test.pp
Type: application/octet-stream
Size: 254 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20020904/cbc10350/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: crypt_h.pp
Type: application/octet-stream
Size: 134 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20020904/cbc10350/attachment-0001.obj>


More information about the fpc-pascal mailing list