Private/Storage/FlatFile/Unprotect-PukFlatFileData.ps1

function Unprotect-PukFlatFileData {
    [CmdletBinding()]
    [OutputType([psobject])]
    param(
        [Parameter(Mandatory)]
        [string]$Content,

        [System.Security.Cryptography.X509Certificates.X509Certificate2]$Certificate
    )

    $decrypted = if ($Certificate) {
        Unprotect-CmsMessage -Content $Content -To $Certificate
    }
    else {
        Unprotect-CmsMessage -Content $Content
    }

    return $decrypted | ConvertFrom-Json
}