DEV Community

Discussion on: A clean way to pass configs in a Go application

Collapse
 
ilyakaznacheev profile image
Ilya Kaznacheev

For example?

Collapse
 
geosoft1 profile image
George Calianu • Edited

One method could be digesting the input password with a hardcoded salt resulting the final password for the server (initial password can't be used without the second salt even you know the encription method and can't be reversed).

Other method, encrypt password with a hardcoded salt, store encrypted in the configuration file and decrypt at load with the same salt as in the following example.

thepolyglotdeveloper.com/2018/02/e...

Thread Thread
 
ilyakaznacheev profile image
Ilya Kaznacheev

Interesting, thanks