C# Класс System.Security.Cryptography.DerEncoder

Writes data encoded via the Distinguished Encoding Rules for Abstract Syntax Notation 1 (ASN.1) data.
Показать файл Открыть проект Примеры использования класса

Приватные методы

Метод Описание
AtoI ( char c ) : int
ConcatenateArrays ( byte segments ) : byte[]
ConstructSegmentedSequence ( ) : byte[][]

Make a constructed SEQUENCE of the byte-triplets of the contents, but leave the value in a segmented form (to be included in a larger SEQUENCE).

ConstructSegmentedSet ( ) : byte[][]

Make a constructed SET of the byte-triplets of the contents, but leave the value in a segmented form (to be included in a larger SEQUENCE).

ConstructSequence ( ) : byte[]

Make a constructed SEQUENCE of the byte-triplets of the contents. Each byte[][] should be a byte[][3] of {tag (1 byte), length (1-5 bytes), payload (variable)}.

ConstructSequence ( IEnumerable items ) : byte[]

Make a constructed SEQUENCE of the byte-triplets of the contents. Each byte[][] should be a byte[][3] of {tag (1 byte), length (1-5 bytes), payload (variable)}.

EncodeLength ( int length ) : byte[]
EncodeRid ( List encodedData, System.Numerics.BigInteger &rid ) : void
IsPrintableStringCharacter ( char c ) : bool
IsValidPrintableString ( char chars ) : bool

Test to see if the input characters contains only characters permitted by the ASN.1 PrintableString restricted character set.

IsValidPrintableString ( char chars, int offset, int count ) : bool

Test to see if the input substring contains only characters permitted by the ASN.1 PrintableString restricted character set.

ParseOidRid ( string oidValue, int &startIndex ) : System.Numerics.BigInteger
SegmentedEncodeBitString ( byte data ) : byte[][]

Encode the segments { tag, length, value } of a bit string where all bits are significant.

SegmentedEncodeBitString ( int unusedBits, byte data ) : byte[][]

Encode the segments { tag, length, value } of a bit string where the least significant unusedBits of the last byte are padding.

SegmentedEncodeBoolean ( bool value ) : byte[][]

Encode the segments { tag, length, value } of a boolean.

SegmentedEncodeIA5String ( char chars ) : byte[][]

Encode a string of characters as a IA5String value.

SegmentedEncodeIA5String ( char chars, int offset, int count ) : byte[][]

Encode a substring as a IA5String value.

SegmentedEncodeNamedBitList ( byte bigEndianBytes, int namedBitsCount ) : byte[][]

Encode the segments { tag, length, value } of a bit string value based upon a NamedBitList. ((bigEndianBytes[0] >> 7) & 1) is considered the "leading" bit, proceeding through the array for up to namedBitsCount.

SegmentedEncodeOctetString ( byte data ) : byte[][]

Encode the segments { tag, length, value } of an octet string (byte array).

SegmentedEncodeOid ( Oid oid ) : byte[][]

Encode the segments { tag, length, value } of an object identifier (Oid).

SegmentedEncodePrintableString ( char chars ) : byte[][]

Encode a character string as a PrintableString value.

SegmentedEncodePrintableString ( char chars, int offset, int count ) : byte[][]

Encode a substring as a PrintableString value.

SegmentedEncodeUnsignedInteger ( byte bigEndianBytes ) : byte[][]

Encode the segments { tag, length, value } of an unsigned integer.

SegmentedEncodeUnsignedInteger ( byte bigEndianBytes, int offset, int count ) : byte[][]

Encode the segments { tag, length, value } of an unsigned integer represented within a bounded array.

SegmentedEncodeUtf8String ( char chars ) : byte[][]

Encode a character string as a UTF8String value.

SegmentedEncodeUtf8String ( char chars, int offset, int count ) : byte[][]

Encode a substring as a UTF8String value.