Securing a password in source code?

后端 未结 10 1894
醉酒成梦
醉酒成梦 2020-11-28 07:18

I have a password in my code which is needed to connect to a sftp server. Whats the best way to \"obfuscate\" or hide it in the code?

Thanks

10条回答
  •  余生分开走
    2020-11-28 08:14

    There are no "best way" to store password in source code since it can be recovered in many ways.

    You can obfuscate password string or even encrypt it to prevent reveal thru simple viewing but it can't be treated as serious protection.

提交回复
热议问题