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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T19:41:31+00:00 2026-05-20T19:41:31+00:00

In my project, I xor’ed (sorry but dont know the proper verb) a string

  • 0

In my project, I xor’ed (sorry but dont know the proper verb) a string and encrypted with RSA-1024. Now I have an xored and encrypted string like:

994624f87a00f4c3066c2a2d38917fe4971be8ad4e6ba58d14cc8b27ab8db84ec2a577f7bda1839cb9843ce6f738f51807ba127b775725ef14e3cea61091bf1fdcfa1372e1975f1b9418b0ad396bea5e7d2a832b8c4161e3b0595f7ed7e57eeda0ad8ab7a7268c871ab4e6d13e3caccaa8b54740ec2d1b8d23d835ff77c78161

When i try to decrypt with…

Cipher cipher2 = Cipher.getInstance("RSA");
cipher2.init(Cipher.DECRYPT_MODE, priKey);
byte[] cipherData = cipher2.doFinal(data);

it returns non-logical characters like

â—?â—?â—?â—?â—?â—?â—?â—?

i know the reason; when bits that have proper ascii counterparts xored, the answer may not have an ascii counterpart. So im trying to find a different format such as binary to use inside doFinal().

Looking forward to an answer,

Thanks in advance.

  • 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-20T19:41:32+00:00Added an answer on May 20, 2026 at 7:41 pm

    Why are you XORing the plaintext? If you’re going to encrypt it anyway, XORing doesn’t seem to accomplish anything.

    Beyond that cipherData is a misleading name: that’s actually your (XORd) cleartext, since you are getting it from the decryption step.

    If you continue with the XOR scheme, you need to XOR those bytes again before attempting to decode them into a String. When you do that step, you probably need to specify the encoding used, e.g., UTF-8, just to be safe.

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

Sidebar

Related Questions

The project is ASP.NET 2.0, I have never been able to reproduce this myself,
I have a C++ project with the following definition in the header file: typedef
I have ported our project from Delphi 7 to Delphi 2010. After adding some
I have been trying to solve Project Euler's problem #59 for a while, and
Ok guys just a small game: I have some specifications for a project. At
I can reference Matlab code from a x86 based project, but not from an
I have a maven project A that use hibernate-annotations 3.4.0.GA which use the slf4j-api
I know about Monotouch and I have virtual MacOS and Monodevelop/Monotouch installed. However, is
I have a project that adds elements to an AutoCad drawing. I noticed that
I am making a project in which i have a login page. i am

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.