StringExtensions.ProtectBinaryForUser Method
Encrypts a collection of bytes with the user key and salt. This element is introduced in Windows PowerShell 5.0.
Namespace: Microsoft.OneGet.Utility.Extensions
Assembly: Microsoft.OneGet.Utility (in Microsoft.OneGet.Utility.dll)
Usage
'Usage
Dim binaryData As IEnumerable(Of Byte)
Dim salt As String
Dim returnValue As IEnumerable(Of Byte)
returnValue = StringExtensions.ProtectBinaryForUser(binaryData, salt)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function ProtectBinaryForUser ( _
binaryData As IEnumerable(Of Byte), _
salt As String _
) As IEnumerable(Of Byte)
[ExtensionAttribute]
public static IEnumerable<byte> ProtectBinaryForUser (
IEnumerable<byte> binaryData,
string salt
)
[ExtensionAttribute]
public:
static IEnumerable<unsigned char>^ ProtectBinaryForUser (
IEnumerable<unsigned char>^ binaryData,
String^ salt
)
/** @attribute ExtensionAttribute() */
public static IEnumerable<byte> ProtectBinaryForUser (
IEnumerable<byte> binaryData,
String salt
)
ExtensionAttribute
public static function ProtectBinaryForUser (
binaryData : IEnumerable<byte>,
salt : String
) : IEnumerable<byte>
Parameters
- 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.
Platforms
Target Platforms
See Also
Reference
StringExtensions Class
StringExtensions Members
Microsoft.OneGet.Utility.Extensions Namespace