RequestExtensions.ProtectForUser Method
Encrypts the given string with the machine key and salt 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 text As String
Dim salt As String
Dim returnValue As IEnumerable(Of Byte)
returnValue = RequestExtensions.ProtectForUser(text, salt)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function ProtectForUser ( _
text As String, _
salt As String _
) As IEnumerable(Of Byte)
[ExtensionAttribute]
public static IEnumerable<byte> ProtectForUser (
string text,
string salt
)
[ExtensionAttribute]
public:
static IEnumerable<unsigned char>^ ProtectForUser (
String^ text,
String^ salt
)
/** @attribute ExtensionAttribute() */
public static IEnumerable<byte> ProtectForUser (
String text,
String salt
)
ExtensionAttribute
public static function ProtectForUser (
text : String,
salt : String
) : IEnumerable<byte>
Parameters
- text
The text.
- 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.
Platforms
Target Platforms
See Also
Reference
RequestExtensions Class
RequestExtensions Members
Microsoft.OneGet.PackageProvider.Bootstrap Namespace