Leaderboard
Popular Content
Showing content with the highest reputation on 12/24/24 in Posts
-
Hi, I waited for someone else to add an answer for you as i don't use LockBox, and have no experience with it, sources i looked at https://github.com/TurboPack/LockBox https://github.com/TurboPack/LockBox3 Now to what i see (without building or compiling anything): 1) Extracted the private key from your post and pasted it on ASN1 decoder and here the result https://lapo.it/asn1js/#MIICXAIBAAKBgQDFoP5AJIv1KFGRpv_Uw7drFXjWbZG6wNsO7P58ocZIcxyKGU6uTgXw8N1IvTmd9yXRSdcb2fCWB7J_QUQDJQ3YuuXSOQCVOdi8Wy9UoZ5jNdqtZ6CMCvnK_v4Wy38ZhrB0CRkeiuyjmUdfQhe8mh3pE3iFBusYd1TVCxQt3VBkqQIDAQABAoGAaYBaeo-ID6YodWL7a-_XeNkLmxz_EP1nc_5clNgf7AlXkPmVoUORtGBBIVWy7ntDuwh6Ryn_X3hYd8q1riAX1UwVuUduOENmgyzmO1rRIoB_17vzYwVMYOB2h-qbxEqjg4dUfk_1occyDwpehWel-1NIgvQLNYLcn2JXxkAyrMkCQQD37-3Y8sjYxwApgiIClsCjrla73cS_QwzArGEnOjBs86LyzCc0pNzmP2OD0a9VlD3k6dMnhT2Oj-2knZs8dUlHAkEAzA4_mQeFvdiKIkzUBECn3w9Ylu2IfpKnQt_0EFUENxS9ONZ1jj4pzDBfZosgwnE1GiECELM3R_6Pzl-uIGrajwJBALm5HG3az-CykMiHFnrh-kOiII5xvSOYUkEx30THLecvSeyeSPACXwaKjTz9IV31wbdsACQmhsn3vogFF3feU5kCQARP9MYeI5RshBbPeteQKjwLjfq6kFzkaoZ-RyElOs6TMKCH37oe1DFNgGahYBLb45xmwC1sLCnoVk-tM_fZaj8CQGQyIlxwbgNBBdV3wnmtX9yPDflOsjpo3FuBMOu3nZADKEpmTXFgdwP4oMMbCmDvH3dav92LE5JN1cPik9z0Piw And that is correct and valid RSA key, yet clicked and browsed the sources on github, there is no ASN1 decoder in the sources, the closest thing is using OpenSSL to do the loading of the private key, or to be more accurate to decode the private key to usable format by TP. 2) searching for KJUR.crypto.Cipher.decrypt, found this https://kjur.github.io/jsrsasign/api/symbols/KJUR.crypto.Cipher.html So the encryption indeed is RSAOAEP, (RSA encryption is completely different from RSAOAEP for future references don't mix them), also check the sources and its look like TP can do RSAOAEP https://github.com/TurboPack/LockBox3/blob/master/run/RSA/uTPLb_RSA_Primitives.pas#L116 And that what you should use, so your code is using "Signatory: TSignatory" in complete wrong path 3) Also important the JS code does the decryption, and as usual decryption parameters way less than encryption, to perform RSAOAEP encryption and decryption sometimes you need the default parameters and sometimes you need to figure if there is some default must be set before the decryption. 3) Couldn't find useful examples for you but, so others may help here, or you can start by looking at https://github.com/TurboPack/LockBox3/blob/master/test/uLockBox_RSA_TestCases.pas#L466 Notice there codec and no TSignatory, but the most important (for me at least) these keys are not decodable as they are not ASN1, from the sources they look like custom format specific to LockBox Here SO question, close enough to your problem https://stackoverflow.com/questions/68186850/lockbox-3-encrypt-rsa-with-public-certyficate Again couldn't find what can solve your problem in full Suggestion With above i hope you have better understanding what is your problem actually is, it is loading the private key as first step, then perform the right decryption with RSAOAEP, and that is it, so either try with OpenSSL to load and decrypt or look for different library. And good luck !
-
How to solve System Out of Resources in TScrollBox
Remy Lebeau replied to araujoarthur's topic in VCL
Correct. If you want to use your Frames, then I would suggest using a plain TPanel, put your visible Frames on it, and then use a separate TScrollBar to "scroll" through your data, updating the Frames accordingly. If you want to use a virtual TListView, you will have to custom-draw anything beyond simple text. You can try using the TListItem.SubItemImages property or TListView.OnGetSubItemImage event, but I'm not sure if those work in virtual mode or not. I have never used them. I always custom-draw my own images. You can't add an actual button control to a TListView item. You would have to custom-draw an image of a button instead, and then handle the TListView.OnMouse(Down|Up) events to know where the user is clicking within the TListView. You can use the TListView.GetItemAt() and TListView.GetHitTestInfoAt() methods to know which item is underneath the mouse, and in some cases even which portion of the item. However, in the case of your eye button, that is not granular enough, so I would suggest sending an LVM_SUBITEMHITTEST message to the TListView window, which will tell you the item and column indexes that are at a given coordinate. And if needed, there is also the LVM_GETSUBITEMRECT message which gets the display coordinates of a given column within an item. -
The Win32 constants are being declared in the SDK using #define statements, which are parsed during the preprocess stage, and are just straight text replacements. As such, they don't respect C++ namespaces at the compile stage, as the code has already been modified by the preprocessor before the compiler sees it. Thus, the compiler will not see this code, as you expect: namespace Ehlibfmx { namespace Toolcontrols { static _DELPHI_CONST System::Int8 SB_HORZ = System::Int8(0x0); } } But will see this code instead: namespace Ehlibfmx { namespace Toolcontrols { static _DELPHI_CONST System::Int8 0 = System::Int8(0x0); } } Which is a syntax error in the C++ language.
-
Some Delphi IDE versions have an annoying bug with the toolbars that makes them unusable if you customize them. If you have seen this problem, you know it, if not, congratulations! Unfortunately I am one of the people who experience this problem and it annoyed me so much, that I added a workaround to GExperts. ... read on in the blog post.
-
Happy Holidays from Almediadev and DelphiStyles!
Almediadev Support posted a topic in Delphi Third-Party
Dear Delphi Developers! Happy Holidays from Almediadev and DelphiStyles! You can order our product bundles with good discount! https://www.almdev.com https://www.delphistyles.com Regards, Almediadev -
Anybody have Delphi running in a VM on M-series Mac?
samjoko replied to David Schwartz's topic in General Help
You can not migration intel mac to m-series mac virtual machine. Apple M2 Max (64G) OSX Sequoia 15.1.1 Delphi 12.2 Enterprise Parallels 20 It's working fine. Sometime GUI design mode is broken (but, After Editor or VM restart then working fine.) I'll using this develop to Windows and MacOSX Application service. (x32 and x64) -
How to solve System Out of Resources in TScrollBox
Remy Lebeau replied to araujoarthur's topic in VCL
Set TListView.OwnerData=true, set TListView.Items.Count to the number of items you want to display, and use the TListView.OnData event to provide details for each item on demand. The scrollbar will be handled for you. Because those are TListBox styles, not TListView styles. In this situation, set TListView.ViewStyle=vsReport, and add some columns to the TListView.Columns. Then, in the TListView.OnData event, you can provide data for the 1st column using TListItem.Caption, and data for the subsequent columns using TListItem.SubItems. Use the TListView.OnData... events for that purpose. Yes. Probably because you didn't populate the TListView with data yet (see above). Yes. You should not be putting any child controls on to the TListView at all. It is not designed for that. Let it handle the items for you. You just worry about supplying the items with data. And using the TListView.On...Draw... events if you want to custom-draw the items. No. It is just a wrapper for the native behavior provided by Microsoft, see: How to Use Virtual List-View Controls -
Anybody have Delphi running in a VM on M-series Mac?
Patrick PREMARTIN replied to David Schwartz's topic in General Help
I'm on a Parallels VM of Windows ARM since the release of the ARM version of Parallels. All is working fine (except the debugger some times). My Mac mini M1 has 8Gb RAM and 256Gb SSD. It's enough to work but 16Gb RAM is better to open more than 1 VM and 1To of SSD is better to not have external SSD on each USB port... 😉 You can leave your Intel Mac or use it to test your x32/x64 programs compiled for macOS or Windows with Delphi. -
Anybody have Delphi running in a VM on M-series Mac?
Brandon Staggs replied to David Schwartz's topic in General Help
That is simply incorrect. My ARM64 (Snapdragon) Windows laptop runs 32-bit x86 code just fine. Delphi is still a 32-bit IDE. They have 64-bit compilers now if you want to pay for an Enterprise license but the rest of us are slumming it in 32-bits and that's not a problem for ARM-based Windows. -
The title of this thread is "Backward compability". That's referring to the ability to take OLDER versions of projects and build them in NEWER versions of Delphi, and it mainly applies to the language features and VCL. For example, you can still compile programs that declare 'object' types that existed briefly before the 'class' designation showed up. It has been deprecated for 25+ years, but it still works. You can even build old TurboPascal apps and there's a very good chance they'll compile and run without any issues. However, going from a NEWER version to an OLDER version has NEVER been supported. Needless to say, the error you're pointing to is not even in the language nor the VCL, so it's totally outside of Delphi's product domain. Meaning ... you're barking up the wrong tree. Third-party vendors frequently add updates to their libraries. Embt updates Delphi's language and the VCL very infrequently, mostly when a new major version is released. OTOH, companies like TMS Software (among others) frequently release updates based on bugs and requests submitted by their users. I don't know what library this is, but if it's DevEx, then I believe they update their subscribers quarterly. I've worked on projects where we used components from TMS, and in some cases, certain team members loved to complain about the frequency of updates, and they didn't bother doing them sometimes. I always update my libraries regularly, especially if there's something pushed out that fixes a bug or problem I encountered. If I do that and then commit an update, it's highly likely that someone who has not updated their TMS libs will encounter these same errors when attempting to build my code. That's not my fault! Nor does it have anything to do with either Delphi or "backward compatibility". (Frankly, it's a Project Management issue.) The moral of the story is, if you update a library and commit the code for it to your repo, then try opening that latest version on a machine that's got an older version of the library installed, then this is something that's VERY likely to happen. It doesn't matter what version of Delphi it is -- this is saying a property added to a class recently is missing from the version you've got installed on that machine, which is not terribly uncommon. You need to update the library, not Delphi.