Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8972671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T18:16:17+00:00 2026-06-15T18:16:17+00:00

I have the following code in delphi to decrypt: new_size := Length(Source) – 1;

  • 0

I have the following code in delphi to decrypt:

      new_size := Length(Source) - 1;
      for c := 24 to new_size - 1 do
        begin
          v := Source[c];
          v := v - key;
          v := v AND $FF;
          x := v XOR (Source[c + 1]);
          Source[c] := x;
        end;

where

      Source: Array of Byte;

      Key: Byte;

Any one a quick idea how to reverse this (encrypt again) ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T18:16:18+00:00Added an answer on June 15, 2026 at 6:16 pm

    This code is the inverse of the code in the question:

    for c := new_size - 1 downto 24 do
      Source[c] := (Source[c] xor Source[c+1]) + key;
    

    And the code in the question can be written much more simply like this:

    for c := 24 to new_size - 1 do
      Source[c] := (Source[c] - key) xor Source[c+1];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following Delphi code: destructor TXX_XXXX.Destroy; var i: Integer; begin if Assigned(Allocations)
I have the following code in a Delphi 2007 application: function TBaseCriteriaObject.RecursiveCount( ObjType: TBaseCriteriaObjectClass):
I have following Delphi code: type RegbusReq2=packed record Funct:char; Device:char; Device1:char; Starting:integer; Quantity:smallint; _CRC:Word;
I have the following bit of Delphi 7 code to increment a TDateTime value
I have a problem. I have following x86 delphi code which is written in
I have the following code in the OnExecute of a TIdTCPServer (Delphi 2009 and
Basically, I have the following Delphi 2007 code (CustomDrawItem): procedure TForm1.ListViewCustomDrawItem(Sender: TCustomListView; Item: TListItem;
I have a dll coded in Delphi XE2 with the following code: procedure xMain(MSG:String);export;
I have managed to use SAPI Text-To-Speech in Delphi/Lazarus by using the following code:
I have a Delphi program which contains the following code: procedure TForm1.Shape1MouseDown(Sender: TObject; Button:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.