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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:17:17+00:00 2026-06-03T05:17:17+00:00

I am trying to implement AesManaged in my C# class library and being new

  • 0

I am trying to implement AesManaged in my C# class library and being new to encryption wanted some mature guidance. I have been looking at this MSDN example and it encrypts string to binary and back decrypts binary back to string.

How can I adapt this to support string-to-string and binary-to-binary implementations?

  • Some configuration data needs to be stored as encrypted strings in XML files and the registry.
  • Some larger volatile data needs to be encrypted to a binary file.

Since this is a rush task, I thought it best not to rely on assumptions. Not knowing how Aes works, is my requirement as simple to address as getting Encoding.ASCII.GetString and Encoding.ASCII.GetBytes?

  • 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-03T05:17:18+00:00Added an answer on June 3, 2026 at 5:17 am

    Yep, that’s basically all you “need” to do. Convert the string to a byte array and encrypt. The encrypted result won’t be a “friendly” string though. It’ll mostly be unreadable ASCII. If you’re storing the result in XML files, you might want to store the encrypted output as Base64, using ToBase64. When you read the values back in, you’ll want to convert from base64, and decrypt that.

    Depending on the level of security you need, just using AES generally isn’t sufficient. AES will provide confidentiality (the message cannot be read), but not integrity (modifying the encrypted data). Using something like HMAC will tell you if someone has tampered with the data, even if they can’t read it.

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

Sidebar

Related Questions

Im trying to implement an Observer/Observable pattern on an EC2 instance. I have been
SetFocus I'm trying implement the above Se Focus code in a Class Library that
I'm trying to implement AES encryption in my application. I have the following code
im trying to implement some behaviors when a mapview element scrolls... by coding a
Trying to implement some nested loops that are spitting out good old nested html
Trying to implement NSCopying for the first time, and I have a question about
Trying to implement what I thought was a simple concept. I have a user
Trying to implement AVAudioplayer and get some metering data of the played music, but
Trying to implement the new FP 10.1 Global error handler into my projects but
Im trying to implement pagination using multiple searching criteria. Supposed I Have student table.

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.