sameerkapps / SecureStorage

119 stars 32 forks source link

GetValue as SecureString #30

Closed salgiza closed 6 years ago

salgiza commented 6 years ago

Unless I'm missing something, there's no way to recover the stored String as a .Net SecureString.

I'm not sure whether this is intended (because there's no way to recover the value from the OS without creating a String in memory with the value) or an omission that should be included...

sameerkapps commented 6 years ago

Good point. The platform level APIs retrieve values using string type. They are propagated to the caller using the same type. If the caller wants to store the values over time, it will be a good practice to store them as SecureString. If a lot of people ask for SecureString API, I will definitely consider it.