static private ConstructSegmentedSequence ( ) : byte[][] | ||
Résultat | byte[][] |
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)) )); }
internal static byte[] ToSubjectPublicKeyInfo(this ECParameters parameters) { parameters.Validate(); if (!parameters.Curve.IsNamed) { throw new PlatformNotSupportedException(SR.Cryptography_ECC_NamedCurvesOnly); } byte[] pointBlob = GetPointBlob(ref parameters); return(DerEncoder.ConstructSequence( DerEncoder.ConstructSegmentedSequence( s_encodedIdEcPublicKey, DerEncoder.SegmentedEncodeOid(parameters.Curve.Oid)), DerEncoder.SegmentedEncodeBitString(pointBlob))); }