System.Security.Cryptography.DerEncoder.ConstructSequence C# (CSharp) Метод

ConstructSequence() статический приватный Метод

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)}.
static private ConstructSequence ( ) : byte[]
Результат byte[]
        internal static byte[] ConstructSequence(params byte[][][] items)
        {
            return ConstructSequence((IEnumerable<byte[][]>)items);
        }

Same methods

DerEncoder::ConstructSequence ( IEnumerable items ) : byte[]

Usage Example

Пример #1
0
        internal static byte[] ToSubjectPublicKeyInfo(this DSAParameters parameters)
        {
            // SubjectPublicKeyInfo::= SEQUENCE  {
            //    algorithm AlgorithmIdentifier,
            //    subjectPublicKey     BIT STRING  }

            // Dss-Parms ::= SEQUENCE {
            //   p INTEGER,
            //   q INTEGER,
            //   g INTEGER
            // }

            return(DerEncoder.ConstructSequence(
                       DerEncoder.ConstructSegmentedSequence(
                           DerEncoder.SegmentedEncodeOid(s_idDsa),
                           DerEncoder.ConstructSegmentedSequence(
                               DerEncoder.SegmentedEncodeUnsignedInteger(parameters.P),
                               DerEncoder.SegmentedEncodeUnsignedInteger(parameters.Q),
                               DerEncoder.SegmentedEncodeUnsignedInteger(parameters.G)
                               )
                           ),
                       DerEncoder.SegmentedEncodeBitString(
                           DerEncoder.SegmentedEncodeUnsignedInteger(parameters.Y))
                       ));
        }
All Usage Examples Of System.Security.Cryptography.DerEncoder::ConstructSequence