Re: MySQL 8.0: Connector/NET - SecureString
Posted by: Paul Haynes
Date: June 13, 2024 06:38AM

Hello

Thank you for the reply. The SqlConnection has a SqlCredential object which is constructed with a plaintext username and a SecureString password. You then set the SqlConnection.Credential property to go aolongside the rest of the connection string info that was set initially.

This means that the password is not stored in plaintext so cannot be retrieved from memory.

An example of this is here:
https://learn.microsoft.com/en-us/dotnet/api/microsoft.data.sqlclient.sqlcredential?view=sqlclient-dotnet-standard-5.2

It would be excellent if MySQLConnection had an equivalent method for handling passwords that used the SecureString class rather than it being plaintext.

Options: ReplyQuote


Subject
Written By
Posted
Re: MySQL 8.0: Connector/NET - SecureString
June 13, 2024 06:38AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.