Re: [fpc-pascal] position of External: SIGFPE

2013-03-25 Thread Jonas Maebe
On 25 Mar 2013, at 01:55, Xiangrong Fang wrote: Why the External: SIGFPE error not reported on the line it was generated? e.g. In the following code: 1: if SomeCondition then begin 2: Y := exp(Y); 3: end; 4: d := Data[X]; The SIGFPE is generated on line 2, because Y is too big. But while

Re: [fpc-pascal] position of External: SIGFPE

2013-03-25 Thread Xiangrong Fang
We are now several decades later, but for compatibility reasons the FPU on the x86 processors still uses the same logic. It is possible to get the exception at the place where it happened by inserting fwait instructions after every fpu operation. Those tell the cpu to stop executing until the

Re: [fpc-pascal] HMAC_SHA1 and FPC

2013-03-25 Thread Lukas Gebauer
Using Synapse: uses synacode; begin Write(HMAC_SHA1('The quick brown fox jumped over the lazy dog.', 'secret'); end. Result: ]M?p { ? #?O?c I ...because you must convert binary string into hexadecimal string, if you wish. Use: write(StrToHex(HMAC_SHA1('The quick brown fox jumped over

[fpc-pascal] How to create Makefile files?

2013-03-25 Thread silvioprog
Hello, I've the following structure of directories: -src -examples -tests And this file: fpmake.pp - (http://pastebin.com/DTw9QyqF) Now, what steps to create my Makefile and Makefile.fpc files? Thank you! -- Silvio Clécio My public projects - github.com/silvioprog

Re: [fpc-pascal] How to create Makefile files?

2013-03-25 Thread Mattias Gaertner
On Mon, 25 Mar 2013 14:53:04 -0300 silvioprog silviop...@gmail.com wrote: Hello, I've the following structure of directories: -src -examples -tests And this file: fpmake.pp - (http://pastebin.com/DTw9QyqF) Now, what steps to create my Makefile and Makefile.fpc files? The idea

Re: [fpc-pascal] How to create Makefile files?

2013-03-25 Thread silvioprog
2013/3/25 Mattias Gaertner nc-gaert...@netcologne.de On Mon, 25 Mar 2013 14:53:04 -0300 silvioprog silviop...@gmail.com wrote: Hello, I've the following structure of directories: -src -examples -tests And this file: fpmake.pp - (http://pastebin.com/DTw9QyqF) Now, what

Re: [fpc-pascal] HMAC_SHA1 and FPC

2013-03-25 Thread silvioprog
2013/3/25 Lukas Gebauer gebyl...@mlp.cz Using Synapse: uses synacode; begin Write(HMAC_SHA1('The quick brown fox jumped over the lazy dog.', 'secret'); end. Result: ]M?p { ? #?O?c I ...because you must convert binary string into hexadecimal string, if you wish. Use:

Re: [fpc-pascal] HMAC_SHA1 and FPC

2013-03-25 Thread silvioprog
2013/3/24 Sven Barth pascaldra...@googlemail.com On 24.03.2013 16:59, silvioprog wrote: My function is more fast that cHash (http://fundementals.**sourceforge.net/dl.htmlhttp://fundementals.sourceforge.net/dl.html). The comparison result is: HMAC: 00:00:01:689 cHash: 00:00:02:038 My

Re: [fpc-pascal] HMAC_SHA1 and FPC

2013-03-25 Thread Anthony Walter
On Mon, Mar 25, 2013 at 11:24 PM, silvioprog silviop...@gmail.com wrote: Nice. But there situations that the user does not have the OpenSSL lib. The routines I sent does not depend on external libs. -- Silvio Clécio My public projects - github.com/silvioprog It's possible to build

Re: [fpc-pascal] HMAC_SHA1 and FPC

2013-03-25 Thread silvioprog
2013/3/26 Anthony Walter sys...@gmail.com On Mon, Mar 25, 2013 at 11:24 PM, silvioprog silviop...@gmail.com wrote: Nice. But there situations that the user does not have the OpenSSL lib. The routines I sent does not depend on external libs. -- Silvio Clécio My public projects -

Re: [fpc-pascal] HMAC_SHA1 and FPC

2013-03-25 Thread Anthony Walter
On Tue, Mar 26, 2013 at 12:23 AM, silvioprog silviop...@gmail.com wrote: Don't know why so much work if you can use it directly from the FCL. Because... OpenSSL is quite robust, well documented. tested, and proven OpenSSL provides a full compilement of cryptography and hashing functions On

Re: [fpc-pascal] HMAC_SHA1 and FPC

2013-03-25 Thread silvioprog
2013/3/26 Anthony Walter sys...@gmail.com On Tue, Mar 26, 2013 at 12:23 AM, silvioprog silviop...@gmail.com wrote: Don't know why so much work if you can use it directly from the FCL. Because... OpenSSL is quite robust, well documented. tested, and proven OpenSSL provides a full

Re: [fpc-pascal] HMAC_SHA1 and FPC

2013-03-25 Thread Anthony Walter
On Tue, Mar 26, 2013 at 1:20 AM, silvioprog silviop...@gmail.com wrote: I don't know if you noticed, but I sent the ALL test cases required by the RFC 2202 (http://tools.ietf.org/html/rfc2202), i.e., it's enough to check whether the algorithm it's well implemented or not. I'll await the