Пример #1
0
 public virtual InfoTypeAndValue[] ToInfoTypeAndValueArray()
 {
     InfoTypeAndValue[] array = new InfoTypeAndValue[content.Count];
     for (int i = 0; i != array.Length; i++)
     {
         array[i] = InfoTypeAndValue.GetInstance(content[i]);
     }
     return(array);
 }
Пример #2
0
 public virtual InfoTypeAndValue[] GetGeneralInfo()
 {
     if (generalInfo == null)
     {
         return(null);
     }
     InfoTypeAndValue[] array = new InfoTypeAndValue[generalInfo.Count];
     for (int i = 0; i < array.Length; i++)
     {
         array[i] = InfoTypeAndValue.GetInstance(generalInfo[i]);
     }
     return(array);
 }
        private void FinalizeHeader(AlgorithmIdentifier algorithmIdentifier)
        {
            hdrBuilBuilder.SetProtectionAlg(algorithmIdentifier);
            if (generalInfos.Count > 0)
            {
                InfoTypeAndValue[] genInfos = new InfoTypeAndValue[generalInfos.Count];
                for (int t = 0; t < genInfos.Length; t++)
                {
                    genInfos[t] = (InfoTypeAndValue)generalInfos[t];
                }

                hdrBuilBuilder.SetGeneralInfo(genInfos);
            }
        }
 public ProtectedPkiMessageBuilder AddGeneralInfo(InfoTypeAndValue genInfo)
 {
     generalInfos.Add(genInfo);
     return(this);
 }
Пример #5
0
 private static Asn1Sequence MakeGeneralInfoSeq(InfoTypeAndValue generalInfo)
 {
     return(new DerSequence(generalInfo));
 }
Пример #6
0
 public virtual PkiHeaderBuilder SetGeneralInfo(InfoTypeAndValue genInfo)
 {
     return(SetGeneralInfo(MakeGeneralInfoSeq(genInfo)));
 }