Giter Club home page Giter Club logo

Comments (20)

ertankucukoglu avatar ertankucukoglu commented on June 20, 2024

You did not tell your Delphi version. Library supports Delphi Tokyo and newer versions. Library also needs HashLib4Pascal and SimpleBaseLib4Pascal.

I have no problem compiling the library and the ClpDigest.pas unit using Delphi 10.4.2 and I have identical code in my system. I also checked and made sure that I have the latest code from GitHub and they were actually the latest.

I have following library units in my test project they also need ClpDigest.pas to be compiled.

uses
  ClpIBufferedCipher,
  ClpCipherUtilities,
  ClpIParametersWithIV,
  ClpParametersWithIV,
  ClpParameterUtilities;

You probably need to give more information about your problem.

BTW, IXOF is an interface which is defined in HlpIHashInfo.pas in HaslLib4Pascal codes.

My wild guess, your search path is not complete. Search path for this library should have about 68 paths in it including CryptoLib4Pascal, SimpleBaseLib4Pascal, HashLib4Pascal.

from cryptolib4pascal.

Uefi1 avatar Uefi1 commented on June 20, 2024

You did not tell your Delphi version. Library supports Delphi Tokyo and newer versions. Library also needs HashLib4Pascal and SimpleBaseLib4Pascal.

In any case, you can change the code so that it fits all versions of Delphi, my Version is Delphi XE2
UPD:
really took the latest HashLib and already passed on now the actual errors are:

const
  EmptyBytesNil: TCryptoLibCustomByteArrayBuffer = (FData: Nil; FLength: 0;
    FIsNil: True);

[DCC Error] ClpCryptoLibTypes.pas(226): E2071 This type cannot be initialized
constructor TRandom.Create;
begin
{$IFDEF FPC}
  Create(Int32(TThread.GetTickCount64));
{$ELSE}
  Create(Int32(TThread.GetTickCount)); // replaced by Create(Int32(Windows.GetTickCount)); ??????
 
{$ENDIF FPC}
end;

[DCC Error] ClpRandom.pas(108): E2003 Undeclared identifier: 'GetTickCount'
  const
    ZeroBytes: TCryptoLibByteArray = Nil;

[DCC Error] ClpAsn1Objects.pas(985): E2071 This type cannot be initialized
  const
    ZeroBytes: TCryptoLibByteArray = Nil;
[DCC Error] ClpAsn1Objects.pas(985): E2071 This type cannot be initialized

from cryptolib4pascal.

Xor-el avatar Xor-el commented on June 20, 2024

Hello @Uefi1 as @ertankucukoglu has pointed out CryptoLib4Pascal has never supported XE2 from it's inception.
the minimum supported version is Delphi Tokyo.
you can try to modify the code for XE2 support but that would be a humongous task as even I was not able to achieve that when building out the library in the first place since the code uses a couple of modern Delphi features not available in XE2.
Making HashLib4Pascal and SimpleBaseLib4Pascal compatible with XE2 was quite easy because it was initially built with Delphi 2010 support in mind.
if this is a task you wish to undertake then that is fine but I am not willing to go through that process for this Library.

One last thing, if you can't afford to upgrade to the latest version of Delphi, you can consider using Lazarus/FPC as that is free and supported by this library.

from cryptolib4pascal.

Uefi1 avatar Uefi1 commented on June 20, 2024

if this is a task you wish to undertake then that is fine but I am not willing to go through that process for this Library.

I still don't understand if I need this library or not, does it allow me to work with bip39 mnemonic phrases or not?

from cryptolib4pascal.

Xor-el avatar Xor-el commented on June 20, 2024

if this is a task you wish to undertake then that is fine but I am not willing to go through that process for this Library.

I still don't understand if I need this library or not, does it allow me to work with bip39 mnemonic phrases or not?

out of the box, no. however, this library provides Cryptographic primitives which you can build on top to achieve your goals if you know how to use it.

from cryptolib4pascal.

Uefi1 avatar Uefi1 commented on June 20, 2024

out of the box, no. however, this library provides Cryptographic primitives which you can build on top to achieve your goals if you know how to use it.
Is there anything I can use out of the box to work with bip39 bip44 from Delphi ?

from cryptolib4pascal.

Xor-el avatar Xor-el commented on June 20, 2024

out of the box, no. however, this library provides Cryptographic primitives which you can build on top to achieve your goals if you know how to use it.
Is there anything I can use out of the box to work with bip39 bip44 from Delphi ?

Unfortunately, not sure of any.

from cryptolib4pascal.

Uefi1 avatar Uefi1 commented on June 20, 2024

Unfortunately, not sure of any.
Please make such a library for delphi =)

from cryptolib4pascal.

ctriroli avatar ctriroli commented on June 20, 2024

You can use PBKDF2 to implement BIP39 easily ... PBKDF2 is contained for example in the TMS Crypt Lib.
https://learnmeabitcoin.com/technical/mnemonic shows how to do it. Alternatively you could create a C DLL based on some code here and use that wihtin your Delphi project.

from cryptolib4pascal.

Xor-el avatar Xor-el commented on June 20, 2024

You can use PBKDF2 to implement BIP39 easily ... PBKDF2 is contained for example in the TMS Crypt Lib. https://learnmeabitcoin.com/technical/mnemonic shows how to do it. Alternatively you could create a C DLL based on some code here and use that wihtin your Delphi project.

I think this is the best approach for him as he is not able to upgrade his Delphi version at this moment.
That been said, if he only needs PBKDF2 to implement BIP39 (no idea about this) , then HashLib4Pascal is sufficient too.

from cryptolib4pascal.

Uefi1 avatar Uefi1 commented on June 20, 2024

You can use PBKDF2 to implement BIP39 easily ... PBKDF2 is contained for example in the TMS Crypt Lib.

I think this is the best approach for him as he is not able to upgrade his Delphi version at this moment.
That been said, if he only needs PBKDF2 to implement BIP39 (no idea about this) , then HashLib4Pascal is sufficient too.

Yes, I tried to run javascripts bip39 https://github.com/iancoleman/bip39 from under delphi, there are several libraries for this: ChakraCore, v8delphiwrapper, but since I know very little javascript, my attempts were unsuccessful, there you need to somehow correct the javascript codes in order to successfully launch =(

from cryptolib4pascal.

ctriroli avatar ctriroli commented on June 20, 2024

Even better might be to use a Python implementation https://pypi.org/project/bip39/
Delphi and Python in combination rocks as we all hopefully know ;-) https://pythongui.org/python4delphi/

from cryptolib4pascal.

Uefi1 avatar Uefi1 commented on June 20, 2024

Delphi and Python in combination rocks as we all hopefully know ;-)

Such an implementation python4delphi is not suitable since it requires the python itself installed in the system !

from cryptolib4pascal.

Xor-el avatar Xor-el commented on June 20, 2024

@Uefi1 , maybe you can try porting the Python or Javascript implementation to Delphi.
It would be a great way to contribute to the Delphi open source ecosystem.

from cryptolib4pascal.

Uefi1 avatar Uefi1 commented on June 20, 2024

maybe you can try porting the Python or Javascript implementation to Delphi.
It would be a great way to contribute to the Delphi open source ecosystem.

I don't have enough knowledge for this, I'm still just a beginner programmer =)

from cryptolib4pascal.

ctriroli avatar ctriroli commented on June 20, 2024

Delphi and Python in combination rocks as we all hopefully know ;-)

Such an implementation python4delphi is not suitable since it requires the python itself installed in the system !

That is like saying any application with a required dll for deployment would not be suitable. You install Python4Delphi in your IDE and need to distribute the Python DLL with your application (I guess). Why is that not suitable in your situation?

from cryptolib4pascal.

Uefi1 avatar Uefi1 commented on June 20, 2024

That is like saying any application with a required dll for deployment would not be suitable. You install Python4Delphi in your IDE and need to distribute the Python DLL with your application (I guess). Why is that not suitable in your situation?

For python4delphi, python must be installed on the system, this is inconvenient !!!

from cryptolib4pascal.

ctriroli avatar ctriroli commented on June 20, 2024

For python4delphi, python must be installed on the system, this is inconvenient !!!

No, you only need to distribute the python dll with your application. Distribution of dlls is a common thing.

from cryptolib4pascal.

ctriroli avatar ctriroli commented on June 20, 2024

For python4delphi, python must be installed on the system, this is inconvenient !!!

No, you only need to distribute the python dll with your application. Distribution of dlls is a common thing.

See: https://en.delphipraxis.net/topic/6686-python-dll-init-question/

from cryptolib4pascal.

Uefi1 avatar Uefi1 commented on June 20, 2024

See: https://en.delphipraxis.net/topic/6686-python-dll-init-question/

Hail, it turns out the bip39 library appeared on chilkat: ))
https://www.example-code.com/delphiDll/bip39_computation_of_binary_seed.asp
I have only one question left, how can I now use this library to convert the mnemonic phrase to the address of the ETHERIUM wallet, if you can figure it out please write me Please =)

from cryptolib4pascal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.