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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:51:38+00:00 2026-06-09T19:51:38+00:00

I have a windows forms applciation that stores encrypted files to disk. At runtime,

  • 0

I have a windows forms applciation that stores encrypted files to disk. At runtime, it decrypts those files and passes the resulting memorystreams to Datasets. I am using symmetric encryption with AESManaged.

There are custom functions to generate Key and IV byte arrays from a string. However I am currently hard coding the secure string that I use to generate Key and Iv, which I think defeats the purpose of encryption. I understand that the best way would be to prompt the user for a password and use that string. Is there any other way around this where I don’t have to prompt the user for a password? Also I cannot use DPAPI because the encrypted data file is expected to be shared between users and computers.

  • 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-09T19:51:40+00:00Added an answer on June 9, 2026 at 7:51 pm

    It is not possible to have your cake and eat it too 🙂 You cannot store decryption key and use it, and not have it recoverable by someone. Only thing you could do is not make it obvious where it is by obfuscating your code, preencrypting your key and decrypting it dynamically, maybe through several rounds of decryption scattered around several classes. Unlike rest of programming disciplines, this is where messy code is a good thing.

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

Sidebar

Related Questions

I have a Windows.Forms based .NET desktop application that stores privileged information in a
I have a windows forms application that reads and updates an XML file with
I have a Windows Forms application that on it I have a RichTextBox, like
I have a Windows Forms application that uses some Application.Idle handlers to change the
If you have a windows service and a windows forms application that uses the
Scenario I have a C# windows forms application that has a number of processes.
I have a .NET 2.0 targeted C# windows forms application that is running fine
I have a requirement to create a simple windows forms application that allows an
I have a solution that contains both a Windows Forms application and a Console
I have a .NET application that contains a checkbox (System.Windows.Forms.Checkbox). This component (WindowsForms10.BUTTON.app.0.378734a1) is

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.