User management support classes (#1856)

* WIP

* Fix nullable warnings in UserData class

* WIP2

* WIP

* Refresh database prototype classes

* Fix some typos & merge issues

* WIP

* WIP

* WIP

* Additional updates

* Remove unneded using
This commit is contained in:
Karl Burtram
2023-02-08 18:02:08 -08:00
committed by GitHub
parent ee086e2067
commit 2ef5f0918a
24 changed files with 3584 additions and 1336 deletions

View File

@@ -9,6 +9,7 @@ using Microsoft.SqlTools.ServiceLayer.Management;
using System;
using System.Collections.Generic;
using System.IO;
using System.Security;
namespace Microsoft.SqlTools.ServiceLayer.Utility
{
@@ -67,5 +68,17 @@ namespace Microsoft.SqlTools.ServiceLayer.Utility
parameters.Add($"{paramName}", contentBytes);
return $"@{paramName}";
}
public static SecureString GetReadOnlySecureString(string secret)
{
SecureString ss = new SecureString();
foreach (char c in secret.ToCharArray())
{
ss.AppendChar(c);
}
ss.MakeReadOnly();
return ss;
}
}
}