Skip to content

Ini file encode or encrypt

george

Asked Sep 13, 2008, 3:47 AM EDT2 answers
Share
LinkedInX

ih is any way to encode or encrypt an ini file so only my application can read???

thanks 

2 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • +1
    Here is a .NET component for processing INI file format that can enable you to achieve the file's encryption pretty easily, for example like the following:
    C#
    // Create new config file with encryption password.
    var configFile = new IniFile(
                        new IniOptions {
                            EncryptionPassword = "My Password" });
     
    // Add some content.
    configFile.Sections.Add(
        new IniSection(configFile, "My Section",
            new IniKey(configFile, "My First Key", "First Keys Value"),
            new IniKey(configFile, "My Second Key", "Second Keys Value"),
            new IniKey(configFile, "My Third Key", "Third Keys Value")));
     
    // Save and encrypt the file.
    configFile.Save("Sample.ini");
    +1
  • Bechir Bejaoui
    0
    Of Corse, there is a way, I invite you to read my article about this
    and this is my other article about enrypting and decrypting config sections within the configuration file but  dont forget to rate them
    0