Search code examples
chocolatey

Is proxy password encrypted or hashed?


Proxy settings page states that with explicit settings a password gets encrypted:

choco config set proxyPassword <passwordThatGetsEncryptedInFile> # optional

https://github.com/chocolatey/choco/wiki/Proxy-Settings-for-Chocolatey#explicit-proxy-settings

Being precise, is it really encrypted or is it hashed?


Solution

  • The password is encrypted.

    You can see that in action here:

    https://github.com/chocolatey/choco/blob/4944318adfff2ea3fe910b4274f87bb3cf57e736/src/chocolatey/infrastructure.app/builders/ConfigurationBuilder.cs#L379

    With the implementation being here:

    https://github.com/chocolatey/choco/blob/19cdf4b0da51fcb5e12d9b616971e605a3ff7c9a/src/chocolatey/infrastructure.app/nuget/NugetEncryptionUtility.cs#L25