Recent

Author Topic: Calculating md5 with with delphi and with freepascal  (Read 18794 times)

jc99

  • Hero Member
  • *****
  • Posts: 553
    • My private Site
Re: Calculating md5 with with delphi and with freepascal
« Reply #15 on: May 13, 2017, 12:34:44 am »
Good for you.
If you want us to try, pack the whole thing (e.G. 7zip) and put it here, then we can test against some compiler, otherwise it's just a shot in the dark.
And you should also tell us what compiler you used before.
OS: Win XP x64, Win 7, Win 7 x64, Win 10, Win 10 x64, Suse Linux 13.2
Laz: 1.4 - 1.8.4, 2.0
https://github.com/joecare99/public
'~|    /''
,_|oe \_,are
If you want to do something for the environment: Twitter: #reduceCO2 or
https://www.betterplace.me/klimawandel-stoppen-co-ueber-preis-reduzieren

Peter Schoenenberg

  • New Member
  • *
  • Posts: 17
Re: Calculating md5 with with delphi and with freepascal
« Reply #16 on: May 13, 2017, 06:32:41 am »

Good Morning (Germany),
 
when installing the new fpc the old have be deinstalled. I think it was 1.4.4, but I am not sure.

I have 7z-ed the the (sha1, md5) - Projekt, which is not big (without .exe).

Thanks again, greetings Peter

Peter Schoenenberg

  • New Member
  • *
  • Posts: 17
Re: Calculating md5 with with delphi and with freepascal
« Reply #17 on: May 13, 2017, 09:21:34 am »

Perhaps yous can help me with another delphi - project, an aes - encryption and aes - decryption, which is not finished and which use no libraries, programmed basically, but in this status it is ok in delphi. I have ported it to lazarus, it is possible to compile, but I get errors, when encrypt and decrypt an any file. I don't know. But ciphering and deciphering is ok. Perhaps somebody has fun to finisch the project. There is no complete decryption of an encrypted file. But it should be not so hard to get a solution for this. I would be thankful, when posting the finished project on this post, so that I can use the encryption decryption programm. The not finished program you find in the attachement.

Thanks a very lot in advanced,
Peter

jc99

  • Hero Member
  • *****
  • Posts: 553
    • My private Site
Re: Calculating md5 with with delphi and with freepascal
« Reply #18 on: May 14, 2017, 02:22:44 am »
I had a little fun with your AES-Program.
I made some clean-up-work and some comments.
... and made it compile on lazarus and on delphi
Also see:
http://wiki.freepascal.org/DCPcrypt
« Last Edit: May 14, 2017, 04:07:30 am by jc99 »
OS: Win XP x64, Win 7, Win 7 x64, Win 10, Win 10 x64, Suse Linux 13.2
Laz: 1.4 - 1.8.4, 2.0
https://github.com/joecare99/public
'~|    /''
,_|oe \_,are
If you want to do something for the environment: Twitter: #reduceCO2 or
https://www.betterplace.me/klimawandel-stoppen-co-ueber-preis-reduzieren

Peter Schoenenberg

  • New Member
  • *
  • Posts: 17
Re: Calculating md5 with with delphi and with freepascal
« Reply #19 on: May 15, 2017, 06:13:24 am »
Thanks for Your help. In the attachment you find a version of aes and md5 and sha1 together. It can be encrypt and decrypt a file and you can determine md5 and sha1 - Hash from a file. It isn't totally checked, but it seems to be good.
Hope you like it.

jc99

  • Hero Member
  • *****
  • Posts: 553
    • My private Site
Re: Calculating md5 with with delphi and with freepascal
« Reply #20 on: May 15, 2017, 06:36:11 pm »
Now you should separate the visual&filehandling part from the actual en/decryption part.
meaning: put the en-/dcryption part in a separate unit/component, so you can use it from other projects.
... btw did you read/understood my comments ? And my project-structure ?
Greetings
OS: Win XP x64, Win 7, Win 7 x64, Win 10, Win 10 x64, Suse Linux 13.2
Laz: 1.4 - 1.8.4, 2.0
https://github.com/joecare99/public
'~|    /''
,_|oe \_,are
If you want to do something for the environment: Twitter: #reduceCO2 or
https://www.betterplace.me/klimawandel-stoppen-co-ueber-preis-reduzieren

Peter Schoenenberg

  • New Member
  • *
  • Posts: 17
Re: Calculating md5 with with delphi and with freepascal
« Reply #21 on: May 17, 2017, 06:29:53 am »

Thanks for your commends. I think, I let the programm as it is in filestructure. In the moment, I don't want to use the components in other units and I think it isn't difficult to do, when it is necessary.

But I have another wish to help. I want to add to the ps-aes - programm an RSA feature with certification like behavior. When transferred my delphi rsa to lazarus, I get the following message when starting the compiled rsa.exe. You find the message which I get when starting rsa.exe in the attachment. TLabel was missing, but compiling was succesful and unit 'stdctrls' is in the unit? Hope you understand my problem? Thanks in advanced.

balazsszekely

  • Guest
Re: Calculating md5 with with delphi and with freepascal
« Reply #22 on: May 17, 2017, 06:54:03 am »
Hi Peter,

Quote
But I have another wish to help. I want to add to the ps-aes - programm an RSA feature with certification like behavior. When transferred my delphi rsa to lazarus, I get the following message when starting the compiled rsa.exe. You find the message which I get when starting rsa.exe in the attachment. TLabel was missing, but compiling was succesful and unit 'stdctrls' is in the unit? Hope you understand my problem? Thanks in advanced.

This particular error usually occurs when there is an inconsistency between the *.pas and *.lfm. For example if I comment out the label1 declaration from class TForm1 , I can easily reproduce the error(see attached image). Make sure label1 from pas file has an equivalent in the lfm and vice versa.

regards,
GetMem
« Last Edit: May 17, 2017, 06:57:49 am by GetMem »

Peter Schoenenberg

  • New Member
  • *
  • Posts: 17
Re: Calculating md5 with with delphi and with freepascal
« Reply #23 on: May 17, 2017, 07:40:40 am »
Thanks a lot. This was the error, when transferring to lazarus. My old RSA is running and seems to be good with good results.

But up to now it is to early to integrate it in ps-aes, because the problem of encrypting - format and key lengths isn't clear to let  encrypt files in acceptable time. In my old program I have used brute force calculations, it is very secure but takes calculation time of my computer of hours.

Greetings and thanks a lot,
Peter

 

TinyPortal © 2005-2018