From 0983e0254dbec19d3c3a3b401d8b47d38826f6ee Mon Sep 17 00:00:00 2001 From: Cody White Date: Tue, 10 May 2022 14:42:43 -0400 Subject: [PATCH] FIPS Compliant Updated SHA256 object creation to be FIPS compliant. --- Windows 10/Install-CloudLAPS_SchTask.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Windows 10/Install-CloudLAPS_SchTask.ps1 b/Windows 10/Install-CloudLAPS_SchTask.ps1 index b8bd3b6..234dfdf 100644 --- a/Windows 10/Install-CloudLAPS_SchTask.ps1 +++ b/Windows 10/Install-CloudLAPS_SchTask.ps1 @@ -209,7 +209,7 @@ $ScriptBlock = { if ($RSAPrivateKey -ne $null) { if ($RSAPrivateKey -is [System.Security.Cryptography.RSACng]) { # Construct a new SHA256Managed object to be used when computing the hash - $SHA256Managed = New-Object -TypeName "System.Security.Cryptography.SHA256Managed" + $SHA256Managed = [System.Security.Cryptography.SHA256Managed]::Create() # Construct new UTF8 unicode encoding object $UnicodeEncoding = [System.Text.UnicodeEncoding]::UTF8 @@ -610,4 +610,4 @@ Function Install-CloudLAPSClient { exit $ExitCode } -Install-CloudLAPSClient \ No newline at end of file +Install-CloudLAPSClient