Encodes string as ASN.1 value (IA5String or UTF8String).

Namespace:  Rebex.Security.Cryptography
Assembly:  Rebex.Common (in Rebex.Common.dll)

Syntax

Visual Basic
Public Shared Function EncodeString ( _
	value As String, _
	encoding As Encoding _
) As Byte()
C#
public static byte[] EncodeString(
	string value,
	Encoding encoding
)

Parameters

value
Type: System..::..String
String.
encoding
Type: System.Text..::..Encoding
Encoding (only ASCII and UTF-8 are currently supported.

Return Value

Encoded string.

Version Information

.NET Compact Framework

Supported in: 3.9, 3.5

See Also