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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T00:28:34+00:00 2026-05-30T00:28:34+00:00

I know it’s a very silly problem as I’m still newbie. Case : String

  • 0

I know it’s a very silly problem as I’m still newbie.

Case :
String A : An output string from an encryption algorithm ( contains special characters )
String B : An output string from a hash function of String A ( contains special characters )

String C = A + "|" + B;

Problem :
I want to send them together from sender as String C so that I can Separate them in receiver
But String A & B may contains my separator “|”

So what do you suggest for me ? [ C# ]

  • 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-30T00:28:36+00:00Added an answer on May 30, 2026 at 12:28 am

    One option would be to convert the output from the encryption tool (which hopefully returns raw bytes) into something like Base64 using the Convert.ToBase64String function, which should be safe to use “|” with. You lose out on space efficiency though, since Base64 wastes a good amount of space, but if you’re dealing with small data you’d be ok.

    If your encryption code does/can not return bytes, you’d have to convert it to bytes first using the appropriate encoder, i.e. Encoding.ASCII.GetBytes() if your string is in ASCII encoding.

    //On the sender side
    byte[] bytesA = Encoding.Default.GetBytes(A);
    byte[] bytesB = Encoding.Default.GetBytes(B);
    string encA = Convert.ToBase64String(bytesA);
    string encB = Convert.ToBase64String(bytesB);
    
    string C = encA + "|" + encB;
    
    //On the receiver side
    string[] parts = C.Split('|');
    string A = Encoding.Default.GetString(Convert.FromBase64String(parts[0]));
    string B = Encoding.Default.GetString(Convert.FromBase64String(parts[1]));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone know how can I replace this 2 symbol below from the string
I know very little about Agile but I wonder if there is any difference
I know Google Maps (or VLC used to) lets you share files from iTunes
I know that I can kick the the preprocessor to spit out output with
I know this is a very simple question for you experts,but please forgive me.Im
I know this is a common problem. I've been looking at the various solutions
I know the title is Very wide - spanning over a lot ! And
Know of an OCAML/CAML IDE? Especially one that runs on Linux?
Know of any good libraries for this? I did some searches and didn't come
Know this might be rather basic, but I been trying to figure out how

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.