dpapi - What Information can be found in every C# application to be used as a unique salt for encryption? -


What information can be found in every C # application that can be used as a unique salt for encryption, In which web applications, window services and WCF layers?

I would like to create a library that allows easy encryption of sensitive data stored in the configuration files (DPAPI) System.Security.Cryptography.ProtectedData.Protect () And System.Security.Cryptography.ProtectedData.Unprotect () methods

The library will also be used by a separate application that I can encrypt and decrypt configuration outside of it. Applications that are using values, which are configured to re-compile everything without configuring files Allows updating or access to the original source, however access to the source should always be available.

The salt should be sufficient to manually enter the separate application (for example, it would be difficult to identify the GUID).

System. Reflections. Asambu GetEntryAssembly () looks promising, If which is the building of this library and the assembly of the application / service, I can use something there before I thought it was "salt Config file name encrypted data is being stored in encrypted data ... ", but the config file for websites is always 'web.config'

Any other thoughts welcome you is.

Update ...

'GetExecutingAssembly ()' ... How does this differ from 'GetEntryAssembly ()'?

Each application / assembly has version number, this can be an option.

  System.Reflection.Assembly.GetExecutingAssembly () getName () Version.ToString () ..    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -