Securing a password in source code?

后端 未结 10 1849
醉酒成梦
醉酒成梦 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:11

    Encrypt it with something strong like AES, but as implied by SLaks, your attacker can reverse engineer your code and work out the encryption method and key. All you are doing is adding a layer which keeps script kiddies and a certain level of attacker out. Someone who really wants to work it out, can do. They could also run your program and watch what password is sent.

提交回复
热议问题