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 1026805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:08:22+00:00 2026-05-16T12:08:22+00:00

i am making a program to implement xor encryption,while playing around with my program

  • 0

i am making a program to implement xor encryption,while playing around with my program i entered various key combinations the program was working perfectly until i entered value of key : 904932 which caused ommition of ‘d’ character e.g if i enter ‘hi my name is dexter and i hate my stupid sister dede’ in edit1,encrypting and decrypting back will
make my edit1 text :’hi my name is exter an i hate my stupi sister ee’
what is going on?

procedure TForm2.Button1Click(Sender: TObject);
    var
     c:char;
     i,key: integer;
    begin
      s := edit1.Text;
       edit1.Text := #0;
       key := strtoint(edit2.text);
       key := key + 128;//i am adding 128  so that i dont get NULL char 
       for I := 1 to length(s)  do {or 0 to lenght(s)? i dont know}
      begin
       c := s[i];
       c := char(ord(c) xor key);
       edit1.Text :=  edit1.Text + c;
      end;
    end;
  • 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-05-16T12:08:23+00:00Added an answer on May 16, 2026 at 12:08 pm

    Adding 128 won’t solve your problem. It just moves it.

    Your “xor key” just xor the last byte of your key, that is $E4 in your case of 904932.
    $E4+128 will be rounded (i.e. -256) to byte value 100, which is the ASCII value of “d”.
    That’s why your “d” disappeared.

    So I guess should NOT use such a xor algorithm if you want to display the encrypted text.
    I’d suggest that you make some simple permutation algorithm.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am making a program with graphics.h in C.I am trying to implement the
I am using the cool map making program DIY map and i want to
I making a program and wanted to make an update function... So lets say
Im making a program for class that manages a Hotel. I have a function
I am making a program that automates the seperation of a csv file. We
I am making a program with which to save banking information (i.e., account, password,
I am currently making a program which is supposed to prompt the user to
I am making a program that graphs a line based on data inputted by
I am currently making a program that will send an email if the date
I'm making a program in Java which will automatically move all of the .png

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.