In the current system architecture, connection strings to different databases are stored in an Azure Key Vault for security. I'm working on a way to have PowerServer API return connection configurations based on the connection strings from the Key Vault. I'm using a custom ConfigurationProvider for the ProviderFactory of the `AddAppConfigFromFileSystem` and have successfully overridden the necessary methods to fetch and return a config based on values from the Key Vault.
That being said, I am not a fan of having the passwords sent back in cleartext over an API. Doing some research, I can see there's the customizedeploy.dll that can be run via dotnet command to encrypt a string, but I'd rather not have to spawn off processes (which might not even work in Azure) to convert the cleartext database passwords I get from the Key Vault to an encrypted version.
Is there a method I can call in PowerServer C# to encrypt the password?