Using SecureString

前端 未结 8 862
醉梦人生
醉梦人生 2020-12-24 00:56

Can this be simplified to a one liner? Feel free to completely rewrite it as long as secureString gets initialized properly.

SecureString secureString = new          


        
8条回答
  •  庸人自扰
    2020-12-24 01:31

    Apart from using unsafe code and a char*, there isn't a (much) better way.

    The point here is not to copy SecureString contents to/from normal strings. The constant "fizzbuzz" constant is the security leak here.

提交回复
热议问题