RequestExtensions.UnprotectBinaryForMachine Method

decrypts the given collection of bytes with the machine key and salt returns an empty collection of bytes on failure This element is introduced in Windows PowerShell 5.0.

Namespace: Microsoft.OneGet.PackageProvider.Bootstrap
Assembly: Microsoft.OneGet.PackageProvider.Bootstrap (in Microsoft.OneGet.PackageProvider.Bootstrap.dll)


Dim binaryData As IEnumerable(Of Byte)
Dim salt As String
Dim returnValue As IEnumerable(Of Byte)

returnValue = RequestExtensions.UnprotectBinaryForMachine(binaryData, salt)


<ExtensionAttribute> _
Public Shared Function UnprotectBinaryForMachine ( _
    binaryData As IEnumerable(Of Byte), _
    salt As String _
) As IEnumerable(Of Byte)
public static IEnumerable<byte> UnprotectBinaryForMachine (
    IEnumerable<byte> binaryData,
    string salt
static IEnumerable<unsigned char>^ UnprotectBinaryForMachine (
    IEnumerable<unsigned char>^ binaryData, 
    String^ salt
/** @attribute ExtensionAttribute() */ 
public static IEnumerable<byte> UnprotectBinaryForMachine (
    IEnumerable<byte> binaryData, 
    String salt
public static function UnprotectBinaryForMachine (
    binaryData : IEnumerable<byte>, 
    salt : String
) : IEnumerable<byte>


  • binaryData
    The binary data.
  • salt
    The salt.

Return Value

Returns IEnumerable.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


Target Platforms

See Also


RequestExtensions Class
RequestExtensions Members
Microsoft.OneGet.PackageProvider.Bootstrap Namespace