Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 01/24/21 in all areas

  1. c0d3r

    My Delphi IDE Editor themes

    Nature: The brick red represents: Flowers, The green: Forest, the orange/yellow: Moon/Sun, the cream white: Clouds, the dark blue background: Deep ocean, the light green (blueish, used for comments) : Rivers. the brown white space: earth. the Sky blue brace pair highlight: The Sky. The red error lines: Fire. File: c0d3r-YW-Nature.theme.xml
  2. Some one is asking for my themes, so I thought its better to create a new post to benefit any one who like them, I called them "Nature" themes, one Nature original theme and one Nature Warm theme, you may use Delphi IDE theme editor (https://github.com/RRUZ/delphi-ide-theme-editor) to apply them: Please click Like if you enjoy it. Nature warm (based on my Nature original theme): File: c0d3r-YW-Nature-warm.theme.xml
  3. Dear visitors, I like to notify you that new version of NextSuite is available. This update was focused on advanced styling of NextGrid and inplace editors, and improvements on HighDPI support: NextSuite includes always growing set of VCL components. Most important components are: NextGrid6 (StringGrid/ListView replacement, written from scratch). NextDBGrid6 (Db variant of the grid) NextInspector6 - An object inspector component.   and many more.  Few screenshots:      Download big demo project from: http://www.bergsoft.net/downloads/vcl/demos/nxsuite6_demo.zip
  4. No, not using a standard TPopupMenu. The menu loop is being handled by Windows (via the TrackPopupMenu API function) and you do not have any control of how it behaves - and that's how it should be; Altering the behavior of something like a menu just leads to poor usability. The fact that you've had to resort to keyboard & mouse hooks should be a hint that they don't want you messing with it. I suggest you display a non-modal form instead. You can easily make that behave like a popup menu, with your custom behavior, without raping the system.
  5. I made a mistake here with this procedure TDECHash.SecureErase; begin ProtectBuffer(Digest^, DigestSize); if FBuffer <> nil then ProtectBuffer(FBuffer^, FBufferSize); end; And i think this version is better to build on , as i am afraid of this line "Result := Result + T", and we are accessing T elements, this could be a problem function PBKDF2(const Password, Salt: TBytes; Iterations: Integer; KeyLength: Integer; HashClass: TDECHashClass): TBytes; var Hash: TDECHash; I, J, C: Integer; BlockCount, HashLengthRounded, SaltLength: Integer; PassLength, DigestLength, BlockSize: Integer; InnerKeyPad, OuterKeyPad: TBytes; SaltEx, T, U, TrimmerPassword: TBytes; begin Hash := HashClass.Create; try // Setup parameters DigestLength := Hash.DigestSize; HashLengthRounded := DigestLength - SizeOf(NativeUInt) + 1; BlockSize := Hash.BlockSize; BlockCount := Trunc((KeyLength + DigestLength - 1) / DigestLength); PassLength := Length(Password); SaltLength := Length(Salt); SaltEx := Salt; SetLength(SaltEx, SaltLength + 4); // reserve 4 bytes for INT_32_BE(i) SetLength(T, DigestLength); // Prepare Password for HMAC calculation // PrepareKeyForHMAC; I := 0; if PassLength > BlockSize then begin TrimmerPassword := Hash.CalcBytes(Password); PassLength := DigestLength; end else TrimmerPassword := Password; SetLength(InnerKeyPad, BlockSize); SetLength(OuterKeyPad, BlockSize); while I < PassLength do begin InnerKeyPad[I] := TrimmerPassword[I] xor $36; OuterKeyPad[I] := TrimmerPassword[I] xor $5C; Inc(I); end; while I < BlockSize do begin InnerKeyPad[I] := $36; OuterKeyPad[I] := $5C; Inc(I); end; // Calculate DK SetLength(Result, BlockCount * DigestLength); for I := 1 to BlockCount do begin SaltEx[SaltLength + 0] := Byte(I shr 24); // INT_32_BE(i) SaltEx[SaltLength + 1] := Byte(I shr 16); SaltEx[SaltLength + 2] := Byte(I shr 8); SaltEx[SaltLength + 3] := Byte(I shr 0); FillChar(T[0], DigestLength, 0); // reset Ti / F U := SaltEx; // initialize U to U1 = Salt + INT_32_BE(i) // Calculate F(Password, Salt, c, i) = U1 ^ U2 ^ ... ^ Uc for C := 1 to Iterations do begin Hash.Init; Hash.Calc(InnerKeyPad[0], BlockSize); Hash.Calc(U[0], Length(U)); Hash.Done; U := Hash.DigestAsBytes; Hash.Init; Hash.Calc(OuterKeyPad[0], BlockSize); Hash.Calc(U[0], DigestLength); Hash.Done; U := Hash.DigestAsBytes; // Ui // F = U1 ^ U2 ^ ... ^ Uc J := 0; while J < HashLengthRounded do begin PNativeUInt(@T[J])^ := PNativeUInt(@T[J])^ xor PNativeUInt(@U[J])^; Inc(J, SizeOf(NativeUInt)); end; while J < DigestLength do begin T[J] := T[J] xor U[J]; Inc(J); end; end; Move(T[0], Result[(I - 1) * DigestLength], DigestLength); // DK += F , DK = DK || Ti end; finally Hash.Free; end; // Trim to the needed key length SetLength(Result, KeyLength); end;
  6. @emailx45 what are you talking about? Do you have to flood every thread with some irrelevant google translated sh*t?
  7. The fact that you regard this topic as important. That you feel it's important to count errors beyond one. The fact that sometimes delphi emits two warnings for the same issue. None of these things matter.
  8. The complete lack of perspective here is breathtaking.
  9. Leaving aside my sarcastic response above, I think a majority of Delphi users will not regard this as an issue. What happens here is that the compiler reaches a point where the errors which have been encountered so far mean that it decides to abort compilation of this unit. And it reports that decision as an error. It's been this way since the dawn of time. Nobody, but nobody, cares about precisely how many errors there are in their code. There are two states that matter: The code has no errors. The code has some errors. Were the compiler to do what you ask, and not write the "cannot compile unit" error, and report a single error, you would not know that there was but a single error. Because the compiler had given up and any errors that are present in the code which follows the point at which the compiler aborted, would not be counted. It is useful for the compiler to report counts of hints and warnings, since these values are meaningful. Counts of errors are, as I have shown above, are not. That this even has to be explained astounds me.
  10. Чукча – не читатель, чукча – писатель ! I am sorry but couldn't help my self , hope this will draw a smile on Russian speaking readers, also i don't know how to translate it right with its context, so help is appreciated here.
  11. MiTeC Project Maker 1.2 released * Fixed CPU affinity adjusting for compiler process + Added Code signing properties to Bulk set More information here
  12. c0d3r

    Customizing source editor

    I liked mine a lot with Ubuntu mono font:
  13. I have found this very NICE and USEFUL Quality Report (posted by a colleague): Please improve the Tool Properties (Tools -> Configure Tools... -> Tool Properties): • Please add a Shortcut edit-box. This would allow starting an IDE tool with a Keyboard Shortcut. This would be very useful! • Please allow creating a toolbar icon from an IDE Tool. This could be done in the same way as in the Toolbar Customize dialog: By dragging a command icon from the IDE Tool dialog to the IDE Toolbar. This would be very useful! Please vote for this, as it would be a very useful improvement: https://quality.embarcadero.com/browse/RSP-27285
×