icinga-powershell-framework/lib/core/tools/ConvertTo-IcingaSecureString.psm1

17 lines
321 B
PowerShell
Raw Normal View History

<#
# Helper class allowing to easily convert strings into SecureStrings
# and vice-versa
#>
function ConvertTo-IcingaSecureString()
{
param (
[string]$String
);
if ([string]::IsNullOrEmpty($String)) {
return $null;
}
return (ConvertTo-SecureString -AsPlainText $string -Force);
}