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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:49:04+00:00 2026-05-14T03:49:04+00:00

I am creating a VB.NET application for a Calculus class as a little side-project.

  • 0

I am creating a VB.NET application for a Calculus class as a little side-project. It requires user profiles that are saved locally in the program’s main files. I am using 2 separate classes to access the user profiles right now.

The first class is called Config and it is used to manipulate the basic config file which contains lesson document paths, settings, and user profile names.

The second class is called User and it is used to load up user profiles from a profile directory where user data is saved in separate text files.

The Config class retrieves the user names, and user profile text file paths. This text file path is then handed off to a User object that can then load up and interpret the file.

Sorry, if that was an overly informative bit, but I thought it would help explain things.

My question is how should I format the config file and user files so they are secure enough that someone can not easily retrieve or manipulate data?

Here is a sample of how I am reading the text files:

Dim userList() As String = {Nothing}
If My.Computer.FileSystem.FileExists(configPath + "config.cfg") Then
    Using MyReader As New Microsoft.VisualBasic.FileIO.TextFieldParser(configPath + "config.cfg")
        MyReader.TextFieldType = Microsoft.VisualBasic.FileIO.FieldType.Delimited
        MyReader.Delimiters = New String() {"="}
        Dim currentRow As String()
            'Loop through all of the fields in the file.' 
            'If any lines are corrupt, report an error and continue parsing.' 
        While Not MyReader.EndOfData
            Try
                currentRow = MyReader.ReadFields()
                    'interpret data tokens delimited by "=" and new line character here'
            Catch ex As Microsoft.VisualBasic.FileIO.MalformedLineException
                MsgBox("Line " & ex.Message & " is invalid.  Skipping")
            End Try
        End While
    End Using
End If

The problem isn’t reading the text file, I am just not sure how to make it secure. I was thinking about first parsing the entire file to translate it from ‘encrypted’ to text, and then save it as a temporary file which I would pass off to the above code, then delete the file immediately afterward. As for ‘encrypting’ (is that the right word for this?) the file, I could maybe bit-shift each character using a key that I would save at the beginning of the file.

I am more interested in saving the file securely then worrying how much of an over-kill it might be. This is more of practice I guess.

  • 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-14T03:49:05+00:00Added an answer on May 14, 2026 at 3:49 am

    Well… .NET includes A LOT of security and encryption classes.
    I would begin your search by looking in the System.Security.Cryptography namespace.

    If you need help implementing a specific method from within the options there, let us know.

    As a side note, you should be able to handle all of your file access from the System.IO namespace. Try to stay away from the Microsoft.VisualBasic namespace as a lot of the stuff in there is no longer best practice.

    -edit: Typo.

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

Sidebar

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.