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:
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 . . .
- 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.
- Use 'for' loops rather than 'while' loops.
- Reduce the code for every character. Check for bEncrypt before entering repeated similar code in a 'for' loop for each character action.
- IMO sTable should be initialised before use by := '' or SetLength(). AIUI variables in functions are not zeroed, and you might be using garbage.
- 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;
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!
Tuesday August 24, 2010
in
FDAC ::

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:
- Excellent
- Superb
- Good
- Average
- Poor
If you already voted, take a look at
poll results.
Related: