Re: [fpc-pascal] HMAC_SHA1 and FPC

2013-03-25 Thread silvioprog
2013/3/26 Anthony Walter > On Tue, Mar 26, 2013 at 1:20 AM, silvioprog 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. >> >>

Re: [fpc-pascal] HMAC_SHA1 and FPC

2013-03-25 Thread Anthony Walter
On Tue, Mar 26, 2013 at 1:20 AM, silvioprog 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 answer of the staff

Re: [fpc-pascal] HMAC_SHA1 and FPC

2013-03-25 Thread silvioprog
2013/3/26 Anthony Walter > On Tue, Mar 26, 2013 at 12:23 AM, silvioprog 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 ha

Re: [fpc-pascal] HMAC_SHA1 and FPC

2013-03-25 Thread Anthony Walter
On Tue, Mar 26, 2013 at 12:23 AM, silvioprog 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 Linux/OSX you can lin

Re: [fpc-pascal] HMAC_SHA1 and FPC

2013-03-25 Thread silvioprog
2013/3/26 Anthony Walter > On Mon, Mar 25, 2013 at 11:24 PM, silvioprog 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 >>

Re: [fpc-pascal] HMAC_SHA1 and FPC

2013-03-25 Thread Anthony Walter
On Mon, Mar 25, 2013 at 11:24 PM, silvioprog 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 static lib file

Re: [fpc-pascal] HMAC_SHA1 and FPC

2013-03-25 Thread silvioprog
2013/3/26 Anthony Walter > I use OpenSSL for this stuff, which can be compiled directly into your > project. > > {$ifdef windows} > // optionally link library into the project > {$define static} > {$endif} > > {$ifdef static} > {$define libssl := external} > {$define libeay := external} > {$

Re: [fpc-pascal] HMAC_SHA1 and FPC

2013-03-25 Thread Anthony Walter
I use OpenSSL for this stuff, which can be compiled directly into your project. {$ifdef windows} // optionally link library into the project {$define static} {$endif} {$ifdef static} {$define libssl := external} {$define libeay := external} {$else} {$ifdef unix} {$define libssl := externa

Re: [fpc-pascal] HMAC_SHA1 and FPC

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

Re: [fpc-pascal] HMAC_SHA1 and FPC

2013-03-25 Thread silvioprog
2013/3/25 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(

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

2013-03-25 Thread silvioprog
2013/3/25 Mattias Gaertner > On Mon, 25 Mar 2013 14:53:04 -0300 > silvioprog 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

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

2013-03-25 Thread Mattias Gaertner
On Mon, 25 Mar 2013 14:53:04 -0300 silvioprog 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 of fpmake

[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] 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 jumpe

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

2013-03-25 Thread Lukasz Sokol
On 25/03/2013 09:29, Xiangrong Fang wrote: >> 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 operatio

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 F

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 whil