Share via


RequestExtensions.UnprotectForUser Method

decrypts the given collection of bytes with the user key and salt and returns a string from the UTF8 representation of the bytes. returns an empty string 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)

Usage

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

returnValue = RequestExtensions.UnprotectForUser(binaryData, salt)

Syntax

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

Parameters

  • binaryData
    The binary data.
  • salt
    The salt.

Return Value

Returns String.

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.

Platforms

Target Platforms

See Also

Reference

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