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

  • SEARCH
  • Home
  • 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 380913
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T15:02:05+00:00 2026-05-12T15:02:05+00:00

I have a class that encrypts and decrypts a string. It uses rijndael .

  • 0

I have a class that encrypts and decrypts a string. It uses rijndael. Anyways, I am trying to store an encrypted value on the client. That works all fine and dandy. My problem is when I want to decrypt the value, I need the Key and IV(InitVector) that was used to encrypt the string. They are byte[] values. I currently output those to the client through a javascript variable. I need them when I call a service, as this app talks to a mainframe and it needs the users credentials. They output to the client in the form of

var vector = [143,147,31,70,195,72,228,190,152,222,65,240,152,183,0,161];

I am able to pass that value to my service as a string. My question is , inside my service, how can I convert this string back into a byte array? I have tried

Encoding.ASCII.GetBytes("[143,147,31,70,195,72,228,190,152,222,65,240,152,183,0,161]");

But that is not what I want. That tries to make a new Byte[] from that string value. I need a byte array who’s values are that inside the string. Is this possible? Please provide a quick sample if you know how to do this.

Thanks,
~ck in San Diego

  • 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-12T15:02:05+00:00Added an answer on May 12, 2026 at 3:02 pm

    I would encode the bytes in base64, using System.Convert.ToBase64String and FromBase64String.

    Edit: this program demonstrates this in more detail

    class A{
          public static void Main()
          {
           byte[] a = new byte[]{143,147,31,70,195,72,228,190,152,222,65,240,152,183,0,161};
           string s = System.Convert.ToBase64String(a);
           System.Console.WriteLine(s);
           byte[] b = System.Convert.FromBase64String(s);
           System.Console.Write("[");
           foreach (var n in b)
               System.Console.Write(n+",");
           System.Console.WriteLine("]");
          }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 410k
  • Answers 410k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Let's see if I got right how the Panel should… May 15, 2026 at 7:35 am
  • Editorial Team
    Editorial Team added an answer javacc is not for compiling java source files, use javac! May 15, 2026 at 7:35 am
  • Editorial Team
    Editorial Team added an answer You should use transformers for that purpose. It's easy, you… May 15, 2026 at 7:35 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.