Recent

Author Topic: Problem with xor-el cryptographic packages  (Read 687 times)

xinyiman

  • Hero Member
  • *****
  • Posts: 2152
    • Lazarus and Free Pascal italian community
Problem with xor-el cryptographic packages
« on: December 04, 2019, 11:52:56 am »
Goodmorning everyone. Some time ago the xor-el user helped me with the writing of a code for cryptography using his libraries. By updating its components to the latest version these errors come up.

Code: Pascal  [Select][+][-]
  1. Compile package CryptoLib4PascalPackage 3.1: Successo
  2. Compila il progetto, Destinazione: project1: Codice di uscita 1, Errori: 4, avvertimenti: 1, suggerimenti: 2
  3. ueciescryptor.pas(128,56) Error: Wrong number of parameters specified for call to "Create"
  4. ClpIESWithCipherParameters.pas(79,38) Error: Found declaration: constructor Create(const TBytes;const TBytes;LongInt;LongInt);
  5. ueciescryptor.pas(179,26) Warning: Function result variable of a managed type does not seem to be initialized
  6. ueciescryptor.pas(253,72) Error: Incompatible type for arg no. 3: Got "IIESWithCipherParameters", expected "IAlgorithmParameterSpec"
  7. ClpIIESCipher.pas(34,15) Hint: Found declaration: Init(Boolean;const ICipherParameters;const IAlgorithmParameterSpec;const ISecureRandom);
  8. ueciescryptor.pas(265,76) Error: Incompatible type for arg no. 3: Got "IIESWithCipherParameters", expected "IAlgorithmParameterSpec"
  9. ClpIIESCipher.pas(34,15) Hint: Found declaration: Init(Boolean;const ICipherParameters;const IAlgorithmParameterSpec;const ISecureRandom);
  10.  

I enclose a small example to understand each other. Could you help me fix the code so that it compiles? Thanks
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

Xor-el

  • Sr. Member
  • ****
  • Posts: 412
Re: Problem with xor-el cryptographic packages
« Reply #1 on: December 04, 2019, 01:00:33 pm »
Hi, see the attachment for the updated ueciesencryptor file.

Regards.

xinyiman

  • Hero Member
  • *****
  • Posts: 2152
    • Lazarus and Free Pascal italian community
Re: Problem with xor-el cryptographic packages
« Reply #2 on: February 28, 2021, 12:22:40 pm »
Hi xor-el, I still have a little problem with your crypto drives. Specifically when I press the encrypt button in the AES256 tab. I don't understand what I'm doing wrong. It worked with the old components, with those released on GitHub now it doesn't. Tell me where am I wrong? Thank you
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

Xor-el

  • Sr. Member
  • ****
  • Posts: 412
Re: Problem with xor-el cryptographic packages
« Reply #3 on: March 01, 2021, 10:25:11 am »
Hi xor-el, I still have a little problem with your crypto drives. Specifically when I press the encrypt button in the AES256 tab. I don't understand what I'm doing wrong. It worked with the old components, with those released on GitHub now it doesn't. Tell me where am I wrong? Thank you

Nothing changed in the code since the last time, you are doing something wrong.
You are passing an invalid hex string as the password in the AES256 tab and you are trying to decode it later as a hexstring in uLazAES.pas line 159.

xinyiman

  • Hero Member
  • *****
  • Posts: 2152
    • Lazarus and Free Pascal italian community
Re: Problem with xor-el cryptographic packages
« Reply #4 on: March 02, 2021, 12:04:40 am »
Hi xor-el, I still have a little problem with your crypto drives. Specifically when I press the encrypt button in the AES256 tab. I don't understand what I'm doing wrong. It worked with the old components, with those released on GitHub now it doesn't. Tell me where am I wrong? Thank you

Nothing changed in the code since the last time, you are doing something wrong.
You are passing an invalid hex string as the password in the AES256 tab and you are trying to decode it later as a hexstring in uLazAES.pas line 159.
It's true. Thank you very much
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

 

TinyPortal © 2005-2018