1. Home
  2. Computing & Technology
  3. Delphi Programming

Delphi RTL Quick Reference

The raw power of Delphi is based on a considerable amount of its Run Time Library functions and procedures. Run Time Library, or VCL routines are functions and procedure that are built into Delphi.

Looking for sample codes?

Delphi Programming Spotlight10

Zarko's Delphi Programming Blog

Reverse Engineering (Decompiling) Delphi Applications

Tuesday August 31, 2010
in Advanced Delphi :: Simply speaking, decompilation is the inverse of compilation: translating an executable file into a higher level language. Suppose you lose your Delphi project's source and you only have the executable file: reverse engineering (decompilation) is useful if the original sources are not available.
Hm, "sources not available", does this mean that we can decompile other people's Delphi projects? Well, yes and no..

Read the full article to learn how to Decompile a Delphi application.

Related:

Vigenere Cipher Algorithm - Delphi Implementation (Comments by Alan Lloyd)

Monday August 30, 2010
in Vigenere Cipher :: A long time Delphi developer, Alan Lloyd had a few comments on the recently published Vigenere Cipher - Delphi Implementation - Fancy Delphi Application Contest Entry #49.

Alan suggests:

While we have loads of computation power & memory available today, I think as a professional it is better to code quicker than slower, unless it makes code unclear.

In the posted Vigenere code . . .

  1. String memory allocation/re-allocation is slow so avoid ConCat(), String + String (even though its quicker than ConCat), and Delete(). Better to SetLength for strings and use index accessing for characters.
  2. Use 'for' loops rather than 'while' loops.
  3. Reduce the code for every character. Check for bEncrypt before entering repeated similar code in a 'for' loop for each character action.
  4. IMO sTable should be initialised before use by := '' or SetLength(). AIUI variables in functions are not zeroed, and you might be using garbage.
  5. Crypt by re-referencing the key as given rather that using multiple keys up to the source length.
Here's the Vigenere crypto algorithm as suggested by Allan:

function Vigenere(Src, Key : string; Encrypt : boolean) : string;
const
  OrdMinChar : integer = Ord('A');
  OrdMaxChar : integer = Ord('Z');
  IncludeChars : set of char = ['A'..'Z'];
var
  CharRangeCount, i, j, KeyLen, KeyInc, SrcOrd, CryptOrd : integer;
  SrcA : string;
begin
  CharRangeCount := OrdMaxChar - OrdMinChar + 1;
  KeyLen := Length(Key);
  SetLength(SrcA, Length(Src));
  If Encrypt then 
  begin
    // transfer only included characters to SrcA for encryption
    j := 1;
    for i := 1 to Length(Src) do
      begin
      if (Src[i] in IncludeChars) then 
      begin
        SrcA[j] := Src[i];
        inc(j);
      end;
    end;
    SetLength(SrcA, j - 1);
  end;
  SetLength(Result, Length(SrcA));
  if Encrypt then
    begin
    // Encrypt to Result
    for i := 1 to Length(SrcA) do 
    begin
      SrcOrd := Ord(Src[i]) - OrdMinChar;
      KeyInc := Ord(Key[((i - 1 ) mod KeyLen)+ 1]) - OrdMinChar;
      CryptOrd := ((SrcOrd + KeyInc) mod CharRangeCount) + OrdMinChar;
      Result[i] := Char(CryptOrd);
    end;
  end;
  else
  begin
    // Decrypt to Result
    for i := 1 to Length(SrcA) do 
    begin
      SrcOrd := Ord(Src[i]) - OrdMinChar;
      KeyInc := Ord(Key[((i - 1 ) mod KeyLen)+ 1]) - OrdMinChar;
      CryptOrd := ((SrcOrd - KeyInc + CharRangeCount) mod CharRangeCount) + OrdMinChar;
      // KeyInc may be larger than SrcOrd
      Result[i] := Char(CryptOrd);
    end;
  end;
end;

MonoX - Free ASP.NET Content Management and Social Networking Platform

Thursday August 26, 2010
in ASP.NET :: Mono Software Ltd recently published a new, completely redesigned release of MonoX ASP.NET CMS with full support for Social Networking features.

Inspired by the latest Web technologies and built on top of the Web parts infrastructure, MonoX allows you to design and develop next generation ASP.NET Web portals and applications. It features an intuitive, user-friendly user interface that supports Web parts framework, drag and drop, WYSIWYG interface, content versioning, advanced security model, cross-browser support, advanced templating engine and multi-level personalization.

MonoX comes with everything you need to build fully-featured social environments, including: user profiles, OpenID support, friendship modules, scalable multi-user blog engine with automatic anti-spam protection, photo albums, customizable group architecture with support for public and private groups, discussion boards, file galleries, support for activity streams (event logs), messaging, video conversion and sharing, wall and comments.

Get "MonoXized" on http://monox.mono-software.com!

Vigenere Cipher - Delphi Implementation - Fancy Delphi Application Contest Entry #49

Tuesday August 24, 2010
in FDAC :: Steganography with Delphi Vigenere coding is one of the most ancient forms of cryptography. In a Vigenere cipher, messages are encoded by mapping letters to numeric values and adding the plaintext values to the keytext values, modulo the number of letters in the alphabet.

Interested in how to implement Vigenere cipher in Delphi?

This is the 49th entry to the Fancy Delphi Application Contest

Read the full article to find more about (+ download source code) Vigenere Cipher Delphi Implementation

When you download the application and test, rate it:

  1. Excellent
  2. Superb
  3. Good
  4. Average
  5. Poor
If you already voted, take a look at poll results.

Related:

Explore Delphi Programming
About.com Special Features

You don't have to break the bank on a new computer. Find out how to save on your next PC. More

This simple questionnaire will show you which Web design software tool is right for you. More

  1. Home
  2. Computing & Technology
  3. Delphi Programming

©2010 About.com, a part of The New York Times Company.

All rights reserved.