Consider the following:
_securePassword = New SecureString()
For Each character As Char In password
_securePassword.AppendChar(character)
Next
Surprisingly, the documentation seems to imply this is the "best practice" way to populate a SecureString
with actual information:
When creating a string from a character-at-a-time ...
My question
Why not include a New SecureString(password)
?
This seems like pure boiler-plate code for me as a consumer.