Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 09/30/23 in all areas

  1. Alexander Sviridenkov

    Unit dependency viwer

    1.0.0.19 Disabled folders/libraries (except RTL/VCL) are now displayed as single node with all references to them.
  2. FPiette

    Hext to Byte to Text = x509 cert

    The way numbers are represented is platform dependent. I don't know any platform which use 56 bit for an integer (7 bytes you said). Usually you have 8, 16, 32 ou 64 bits integers (Byte, Short, Integer and Int64 in Delphi). Java code you present make me think that the 7 bytes in the TBytes has to be prefixed by a 8th byte to form a 8 byte (64 bit) integer. (decimal) 1.000.000.000 is (hex)3B 9A CA 00. I don't see thoses bytes in the TBytes you show. So the representation is not direct, whatever the byte order is. Maybe the number is encrypted or it is not 1.000.000.000 ?
  3. FPiette

    Hext to Byte to Text = x509 cert

    ICS (Internet Component Suite) has two units which handle X509 certificates. OverbyteIcsSslX509Certs.pas and OverbyteIcsSslX509Utils.pas. They are somewhat an encapsulation of OpenSSL library and Windows Library. Although I'm ICS main author, I'm not the right person to explain the details. Maybe you should read this post in the support mailing list and start a new post if you have more questions. BTW: ICS is freeware. Look at https://wiki.overbyte.eu.
  4. Kas Ob.

    Hext to Byte to Text = x509 cert

    I see you figured it out , congratulation !
  5. Kas Ob.

    Hext to Byte to Text = x509 cert

    I have no knowledge with smart card ! FPiette answer is right on point. You miss read/write the number (or your source of information wasn't clear) as it is 1000.000.000.000.000 , in hex is 38D7EA4C68000, it is little endian meaning the first byte is zero will not change the value. was going to ask if you can do it on your own then .... but why not program SmallerHex; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils, System.Classes; function HexStringToBytes(const HexString: string): TBytes; var i, c: Integer; st: string; LStingList: TStringList; begin LStingList := TStringList.Create; try LStingList.LineBreak := ' '; LStingList.Text := HexString; SetLength(Result, LStingList.Count); c := 0; for i := 0 to LStingList.Count - 1 do begin st := Trim(LStingList.Strings[i]); if (st <> '') and (Length(st) = 2) then begin HexToBin(PChar(@st[1]), PAnsiChar(@Result[c]), 1); Inc(c); end; end; SetLength(Result, c); finally LStingList.Free; end; end; function BinaryToUInt64_BE(Buffer: PByte; Len: Integer): UInt64; begin if Len > SizeOf(Result) then raise Exception.Create('Requested Size for UInt64 can''t be longer than ' + IntToStr(SizeOf (Result))); Result := 0; while Len > 0 do begin Result := Result shl 8; Result := Result or Buffer^; Inc(Buffer); Dec(Len); end; end; procedure DecodeSumOrSomethingInto2UInt64; var HexBytes: TBytes; First, Second: UInt64; begin HexBytes := HexStringToBytes('00 00 08 99 7D FB 1A 03 8D 7E A4 C6 80 00'); First := BinaryToUInt64_BE(@HexBytes[0], 7); Second := BinaryToUInt64_BE(@HexBytes[7], 7); Writeln(First); Writeln(Second); end; begin DecodeSumOrSomethingInto2UInt64; Readln; end. The result 36934908698 1000000000000000
  6. msd

    Hext to Byte to Text = x509 cert

    The original info from the official documentation is that I got, for example, this 00 00 08 99 7D FB 1A 03 8D 7E A4 C6 80 00 response. I need to convert this data from hex to bytes and use half for the control sum and another half for the total sum. As I can see in their example, they created 2 separate arrays of bytes, set the first byte to 00, and then added the rest of the 7 from the response. I try to convert this method in Delphi's way like this: SetLength(answer, 14); answer[00] := $00; answer[01] := $00; answer[02] := $08; answer[03] := $99; answer[04] := $06; answer[05] := $F6; answer[06] := $5A; answer[07] := $03; answer[08] := $8D; answer[09] := $7E; answer[10] := $A4; answer[11] := $C6; answer[12] := $80; answer[13] := $00; SetLength(bb, 16); bb[0] := 0; Move(answer[0], bb[1], 7); bb[8] := 0; Move(answer[7], bb[9], 7); Move(bb[0], controlSum, SizeOf(Int64)); Move(bb[8], totalSum, SizeOf(Int64)); in this example controlSum is 3.693.490,87 and totalSum is 100.000.000.000,00. this is values behind this response in hex format. Thanks one again for all...
  7. DelphiUdIT

    Indy FTP Server with TLS/SSL

    If you want to play with security, build a Https server (from Indy demo with a little effort). After that you can test it with https://www.ssllabs.com/ssltest/ or with https://testtls.com/ To test, the servers should be public available (firewall NAT is enough). You can play with the project attached, old demo (is ready to compile and run with cert and SSL dll 32 bit (1.02u)). This is the partial result with test, with default (no chiperlist). https-server.zip
  8. Lars Fosdal

    Database

    IMO, connecting directly to a DB from a mobile app is not a good approach. I would recommend that you put a REST API between the app and the DB.
  9. Sherlock

    When will we have a 64-bit IDE version ?

    Now there is the rub! A 64Bit IDE will be experimental at best. Quite the contrary to a stable IDE. Just consider the introduction of DelphiLSP. Now that Baby started birthing more than three years ago, and it is still not "robust". I'd prefer them to fix the 32Bit IDE to reach a robust stage over them pulling resources to that new construction site.
  10. Anders Melander

    When will we have a 64-bit IDE version ?

    The address space of a 32-bit application is 4GB. Some of that is reserved by Windows. By default 2GB but for Large Address Aware applications (such as the Delphi IDE) it's 1 GB. These values can be customized globally. Your hardware configuration (motherboard, etc..) can have an effect on the reserved size, btw. https://learn.microsoft.com/en-us/windows/win32/memory/virtual-address-space If you are running out of memory at 2.5GB then the IDE is trying to make an allocation of 0.5 GB or more. This seems unlikely so there could be something else going on. You might wait to check the size of "hardware reserved memory" on your system. 100 forms open at the same time is hardly a typical use case. Why would you ever want that? FWIW, I just tried opening all the over 600 forms, frames and datamodules of a project with around 3 million lines of code. It uses DevExpress ribbon, docking, skins, grids, and controls, FireDAC, etc. That consumed 3.4 GB but happily compiled and linked. It's a 64-bit project. I'm not saying that your problem isn't real but I don't think this problem is common enough that it alone justifies migrating the IDE to 64-bit. And I certainly don't think your rhetoric will help your case.
×