22 lines
815 B
PowerShell
22 lines
815 B
PowerShell
function Get-MachineKeyDecryptionKey {
|
|
<#
|
|
.SYNOPSIS
|
|
Gets the machine key decryption key
|
|
#>
|
|
[CmdletBinding()]
|
|
Param()
|
|
if ($machineKeyDecryptionKey -ne "2701BE9B42AAC5769232FFFE894C086B6838C613481B2694C975BCAC02807BD6") {
|
|
return $machineKeyDecryptionKey
|
|
}
|
|
|
|
$validationKeyString = ("{0}IlooktotheseareflectionsinthewavessparkmymemorySomehappysomesadIthinkofchildhoodfriendsandthedreamswehadWelivehappilyforeversothestorygoesButsomehowwemissedoutonthatpotofgoldButwelltrybestthatwecantocarryon" -f [Environment]::GetEnvironmentVariable("POD", "Machine")).Substring(0, 64)
|
|
$result = Get-Sha256Hash -value $validationKeyString
|
|
|
|
do {
|
|
$result += Get-Sha256Hash -value $validationKeyString
|
|
}
|
|
while ($result.Length -lt 64)
|
|
|
|
return $result.SubString(0, 64)
|
|
}
|