1 // NOTE: this is a machine generated file--editing not recommended
3 // appleoids.cpp - class member functions for ASN.1 module APPLE-OIDS
5 // This file was generated by snacc on Mon Apr 22 22:34:19 2002
6 // UBC snacc written by Mike Sample
7 // A couple of enhancements made by IBM European Networking Center
11 #include "sm_vdatypes.h"
12 #include "sm_x501ud.h"
13 #include "sm_x411ub.h"
14 #include "sm_x411mtsas.h"
15 #include "sm_x501if.h"
16 #include "sm_x520sa.h"
17 #include "sm_x509cmn.h"
18 #include "sm_x509af.h"
19 #include "sm_x509ce.h"
20 #include "pkcs1oids.h"
21 #include "pkcs9oids.h"
26 #include "appleoids.h"
29 //------------------------------------------------------------------------------
33 //------------------------------------------------------------------------------
34 // class member definitions:
36 DSABsafeParams::DSABsafeParams()
40 DSABsafeParams::DSABsafeParams (const DSABsafeParams
&)
42 Asn1Error
<< "use of incompletely defined DSABsafeParams::DSABsafeParams (const DSABsafeParams &)" << endl
;
46 DSABsafeParams::~DSABsafeParams()
50 AsnType
*DSABsafeParams::Clone() const
52 return new DSABsafeParams
;
55 AsnType
*DSABsafeParams::Copy() const
57 return new DSABsafeParams (*this);
61 DSABsafeParams
&DSABsafeParams::operator = (const DSABsafeParams
&that
)
62 #else // SNACC_DEEP_COPY
63 DSABsafeParams
&DSABsafeParams::operator = (const DSABsafeParams
&)
64 #endif // SNACC_DEEP_COPY
69 keySizeInBits
= that
.keySizeInBits
;
76 #else // SNACC_DEEP_COPY
77 Asn1Error
<< "use of incompletely defined DSABsafeParams &DSABsafeParams::operator = (const DSABsafeParams &)" << endl
;
79 // if your compiler complains here, check the -novolat option
80 #endif // SNACC_DEEP_COPY
84 DSABsafeParams::BEncContent (BUF_TYPE b
)
89 l
= g
.BEncContent (b
);
90 l
+= BEncDefLen (b
, l
);
92 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
95 l
= q
.BEncContent (b
);
96 l
+= BEncDefLen (b
, l
);
98 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
101 l
= p
.BEncContent (b
);
102 l
+= BEncDefLen (b
, l
);
104 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
107 l
= keySizeInBits
.BEncContent (b
);
108 BEncDefLenTo127 (b
, l
);
111 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
115 } // DSABsafeParams::BEncContent
118 void DSABsafeParams::BDecContent (BUF_TYPE b
, AsnTag
/*tag0*/, AsnLen elmtLen0
, AsnLen
&bytesDecoded
, ENV_TYPE env
)
121 AsnLen seqBytesDecoded
= 0;
123 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
125 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
)))
127 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
128 keySizeInBits
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
129 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
133 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
134 SnaccExcep::throwMe(-100);
137 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
138 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
140 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
141 p
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
142 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
146 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
147 SnaccExcep::throwMe(-101);
150 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
151 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
153 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
154 q
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
155 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
159 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
160 SnaccExcep::throwMe(-102);
163 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
164 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
166 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
167 g
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
171 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
172 SnaccExcep::throwMe(-103);
175 bytesDecoded
+= seqBytesDecoded
;
176 if (elmtLen0
== INDEFINITE_LEN
)
178 BDecEoc (b
, bytesDecoded
, env
);
181 else if (seqBytesDecoded
!= elmtLen0
)
183 Asn1Error
<< "ERROR - Length discrepancy on sequence." << endl
;
184 SnaccExcep::throwMe(-104);
188 } // DSABsafeParams::BDecContent
190 AsnLen
DSABsafeParams::BEnc (BUF_TYPE b
)
194 l
+= BEncConsLen (b
, l
);
195 l
+= BEncTag1 (b
, UNIV
, CONS
, SEQ_TAG_CODE
);
199 void DSABsafeParams::BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
)
204 if ((tag
= BDecTag (b
, bytesDecoded
, env
)) != MAKE_TAG_ID (UNIV
, CONS
, SEQ_TAG_CODE
))
206 Asn1Error
<< "DSABsafeParams::BDec: ERROR - wrong tag" << endl
;
207 SnaccExcep::throwMe(-105);
209 elmtLen1
= BDecLen (b
, bytesDecoded
, env
);
210 BDecContent (b
, tag
, elmtLen1
, bytesDecoded
, env
);
213 void DSABsafeParams::Print (ostream
&os
) const
216 os
<< "{ -- SEQUENCE --" << endl
;
217 indentG
+= stdIndentG
;
220 Indent (os
, indentG
);
221 os
<< "keySizeInBits ";
227 Indent (os
, indentG
);
234 Indent (os
, indentG
);
241 Indent (os
, indentG
);
247 indentG
-= stdIndentG
;
248 Indent (os
, indentG
);
251 } // DSABsafeParams::Print
254 DHParameter::DHParameter()
256 privateValueLength
= NULL
;
259 DHParameter::DHParameter (const DHParameter
&)
261 Asn1Error
<< "use of incompletely defined DHParameter::DHParameter (const DHParameter &)" << endl
;
265 DHParameter::~DHParameter()
267 delete privateValueLength
;
270 AsnType
*DHParameter::Clone() const
272 return new DHParameter
;
275 AsnType
*DHParameter::Copy() const
277 return new DHParameter (*this);
281 DHParameter
&DHParameter::operator = (const DHParameter
&that
)
282 #else // SNACC_DEEP_COPY
283 DHParameter
&DHParameter::operator = (const DHParameter
&)
284 #endif // SNACC_DEEP_COPY
291 if (that
.privateValueLength
)
293 if (!privateValueLength
)
294 privateValueLength
= new BigIntegerStr
;
295 *privateValueLength
= *that
.privateValueLength
;
299 delete privateValueLength
;
300 privateValueLength
= NULL
;
305 #else // SNACC_DEEP_COPY
306 Asn1Error
<< "use of incompletely defined DHParameter &DHParameter::operator = (const DHParameter &)" << endl
;
308 // if your compiler complains here, check the -novolat option
309 #endif // SNACC_DEEP_COPY
313 DHParameter::BEncContent (BUF_TYPE b
)
318 if (NOT_NULL (privateValueLength
))
320 l
= privateValueLength
->BEncContent (b
);
321 l
+= BEncDefLen (b
, l
);
323 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
327 l
= base
.BEncContent (b
);
328 l
+= BEncDefLen (b
, l
);
330 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
333 l
= prime
.BEncContent (b
);
334 l
+= BEncDefLen (b
, l
);
336 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
340 } // DHParameter::BEncContent
343 void DHParameter::BDecContent (BUF_TYPE b
, AsnTag
/*tag0*/, AsnLen elmtLen0
, AsnLen
&bytesDecoded
, ENV_TYPE env
)
346 AsnLen seqBytesDecoded
= 0;
348 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
350 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
351 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
353 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
354 prime
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
355 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
359 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
360 SnaccExcep::throwMe(-106);
363 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
364 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
366 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
367 base
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
368 if (seqBytesDecoded
== elmtLen0
)
370 bytesDecoded
+= seqBytesDecoded
;
375 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
377 if ((elmtLen0
== INDEFINITE_LEN
) && (tag1
== EOC_TAG_ID
))
379 BDEC_2ND_EOC_OCTET (b
, seqBytesDecoded
, env
)
380 bytesDecoded
+= seqBytesDecoded
;
387 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
388 SnaccExcep::throwMe(-107);
391 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
392 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
394 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
395 privateValueLength
= new BigIntegerStr
;
396 privateValueLength
->BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
399 bytesDecoded
+= seqBytesDecoded
;
400 if (elmtLen0
== INDEFINITE_LEN
)
402 BDecEoc (b
, bytesDecoded
, env
);
405 else if (seqBytesDecoded
!= elmtLen0
)
407 Asn1Error
<< "ERROR - Length discrepancy on sequence." << endl
;
408 SnaccExcep::throwMe(-108);
412 } // DHParameter::BDecContent
414 AsnLen
DHParameter::BEnc (BUF_TYPE b
)
418 l
+= BEncConsLen (b
, l
);
419 l
+= BEncTag1 (b
, UNIV
, CONS
, SEQ_TAG_CODE
);
423 void DHParameter::BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
)
428 if ((tag
= BDecTag (b
, bytesDecoded
, env
)) != MAKE_TAG_ID (UNIV
, CONS
, SEQ_TAG_CODE
))
430 Asn1Error
<< "DHParameter::BDec: ERROR - wrong tag" << endl
;
431 SnaccExcep::throwMe(-109);
433 elmtLen1
= BDecLen (b
, bytesDecoded
, env
);
434 BDecContent (b
, tag
, elmtLen1
, bytesDecoded
, env
);
437 void DHParameter::Print (ostream
&os
) const
440 os
<< "{ -- SEQUENCE --" << endl
;
441 indentG
+= stdIndentG
;
444 Indent (os
, indentG
);
451 Indent (os
, indentG
);
457 if (NOT_NULL (privateValueLength
))
460 Indent (os
, indentG
);
461 os
<< "privateValueLength ";
462 os
<< *privateValueLength
;
466 Indent (os
, indentG
);
467 os
<< "privateValueLength ";
473 indentG
-= stdIndentG
;
474 Indent (os
, indentG
);
477 } // DHParameter::Print
480 FEECurveParameters::FEECurveParameters()
485 FEECurveParameters::FEECurveParameters (const FEECurveParameters
&)
487 Asn1Error
<< "use of incompletely defined FEECurveParameters::FEECurveParameters (const FEECurveParameters &)" << endl
;
491 FEECurveParameters::~FEECurveParameters()
496 AsnType
*FEECurveParameters::Clone() const
498 return new FEECurveParameters
;
501 AsnType
*FEECurveParameters::Copy() const
503 return new FEECurveParameters (*this);
507 FEECurveParameters
&FEECurveParameters::operator = (const FEECurveParameters
&that
)
508 #else // SNACC_DEEP_COPY
509 FEECurveParameters
&FEECurveParameters::operator = (const FEECurveParameters
&)
510 #endif // SNACC_DEEP_COPY
515 primeType
= that
.primeType
;
516 curveType
= that
.curveType
;
523 x1Plus
= that
.x1Plus
;
524 x1Minus
= that
.x1Minus
;
525 cOrderPlus
= that
.cOrderPlus
;
526 cOrderMinus
= that
.cOrderMinus
;
527 x1OrderPlus
= that
.x1OrderPlus
;
528 x1OrderMinus
= that
.x1OrderMinus
;
532 basePrime
= new BigIntegerStr
;
533 *basePrime
= *that
.basePrime
;
543 #else // SNACC_DEEP_COPY
544 Asn1Error
<< "use of incompletely defined FEECurveParameters &FEECurveParameters::operator = (const FEECurveParameters &)" << endl
;
546 // if your compiler complains here, check the -novolat option
547 #endif // SNACC_DEEP_COPY
551 FEECurveParameters::BEncContent (BUF_TYPE b
)
556 if (NOT_NULL (basePrime
))
558 l
= basePrime
->BEncContent (b
);
559 l
+= BEncDefLen (b
, l
);
561 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
565 l
= x1OrderMinus
.BEncContent (b
);
566 l
+= BEncDefLen (b
, l
);
568 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
571 l
= x1OrderPlus
.BEncContent (b
);
572 l
+= BEncDefLen (b
, l
);
574 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
577 l
= cOrderMinus
.BEncContent (b
);
578 l
+= BEncDefLen (b
, l
);
580 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
583 l
= cOrderPlus
.BEncContent (b
);
584 l
+= BEncDefLen (b
, l
);
586 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
589 l
= x1Minus
.BEncContent (b
);
590 l
+= BEncDefLen (b
, l
);
592 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
595 l
= x1Plus
.BEncContent (b
);
596 l
+= BEncDefLen (b
, l
);
598 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
601 l
= c
.BEncContent (b
);
602 l
+= BEncDefLen (b
, l
);
604 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
607 l
= bb
.BEncContent (b
);
608 l
+= BEncDefLen (b
, l
);
610 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
613 l
= a
.BEncContent (b
);
614 l
+= BEncDefLen (b
, l
);
616 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
619 l
= m
.BEncContent (b
);
620 BEncDefLenTo127 (b
, l
);
623 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
626 l
= k
.BEncContent (b
);
627 BEncDefLenTo127 (b
, l
);
630 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
633 l
= q
.BEncContent (b
);
634 BEncDefLenTo127 (b
, l
);
637 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
640 l
= curveType
.BEncContent (b
);
641 BEncDefLenTo127 (b
, l
);
644 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
647 l
= primeType
.BEncContent (b
);
648 BEncDefLenTo127 (b
, l
);
651 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
655 } // FEECurveParameters::BEncContent
658 void FEECurveParameters::BDecContent (BUF_TYPE b
, AsnTag
/*tag0*/, AsnLen elmtLen0
, AsnLen
&bytesDecoded
, ENV_TYPE env
)
661 AsnLen seqBytesDecoded
= 0;
663 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
665 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
)))
667 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
668 primeType
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
669 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
673 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
674 SnaccExcep::throwMe(-110);
677 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
)))
679 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
680 curveType
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
681 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
685 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
686 SnaccExcep::throwMe(-111);
689 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
)))
691 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
692 q
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
693 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
697 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
698 SnaccExcep::throwMe(-112);
701 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
)))
703 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
704 k
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
705 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
709 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
710 SnaccExcep::throwMe(-113);
713 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
)))
715 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
716 m
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
717 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
721 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
722 SnaccExcep::throwMe(-114);
725 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
726 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
728 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
729 a
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
730 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
734 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
735 SnaccExcep::throwMe(-115);
738 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
739 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
741 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
742 bb
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
743 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
747 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
748 SnaccExcep::throwMe(-116);
751 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
752 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
754 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
755 c
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
756 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
760 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
761 SnaccExcep::throwMe(-117);
764 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
765 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
767 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
768 x1Plus
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
769 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
773 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
774 SnaccExcep::throwMe(-118);
777 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
778 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
780 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
781 x1Minus
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
782 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
786 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
787 SnaccExcep::throwMe(-119);
790 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
791 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
793 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
794 cOrderPlus
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
795 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
799 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
800 SnaccExcep::throwMe(-120);
803 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
804 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
806 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
807 cOrderMinus
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
808 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
812 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
813 SnaccExcep::throwMe(-121);
816 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
817 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
819 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
820 x1OrderPlus
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
821 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
825 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
826 SnaccExcep::throwMe(-122);
829 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
830 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
832 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
833 x1OrderMinus
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
834 if (seqBytesDecoded
== elmtLen0
)
836 bytesDecoded
+= seqBytesDecoded
;
841 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
843 if ((elmtLen0
== INDEFINITE_LEN
) && (tag1
== EOC_TAG_ID
))
845 BDEC_2ND_EOC_OCTET (b
, seqBytesDecoded
, env
)
846 bytesDecoded
+= seqBytesDecoded
;
853 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
854 SnaccExcep::throwMe(-123);
857 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
858 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
860 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
861 basePrime
= new BigIntegerStr
;
862 basePrime
->BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
865 bytesDecoded
+= seqBytesDecoded
;
866 if (elmtLen0
== INDEFINITE_LEN
)
868 BDecEoc (b
, bytesDecoded
, env
);
871 else if (seqBytesDecoded
!= elmtLen0
)
873 Asn1Error
<< "ERROR - Length discrepancy on sequence." << endl
;
874 SnaccExcep::throwMe(-124);
878 } // FEECurveParameters::BDecContent
880 AsnLen
FEECurveParameters::BEnc (BUF_TYPE b
)
884 l
+= BEncConsLen (b
, l
);
885 l
+= BEncTag1 (b
, UNIV
, CONS
, SEQ_TAG_CODE
);
889 void FEECurveParameters::BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
)
894 if ((tag
= BDecTag (b
, bytesDecoded
, env
)) != MAKE_TAG_ID (UNIV
, CONS
, SEQ_TAG_CODE
))
896 Asn1Error
<< "FEECurveParameters::BDec: ERROR - wrong tag" << endl
;
897 SnaccExcep::throwMe(-125);
899 elmtLen1
= BDecLen (b
, bytesDecoded
, env
);
900 BDecContent (b
, tag
, elmtLen1
, bytesDecoded
, env
);
903 void FEECurveParameters::Print (ostream
&os
) const
906 os
<< "{ -- SEQUENCE --" << endl
;
907 indentG
+= stdIndentG
;
910 Indent (os
, indentG
);
917 Indent (os
, indentG
);
924 Indent (os
, indentG
);
931 Indent (os
, indentG
);
938 Indent (os
, indentG
);
945 Indent (os
, indentG
);
952 Indent (os
, indentG
);
959 Indent (os
, indentG
);
966 Indent (os
, indentG
);
973 Indent (os
, indentG
);
980 Indent (os
, indentG
);
987 Indent (os
, indentG
);
988 os
<< "cOrderMinus ";
994 Indent (os
, indentG
);
995 os
<< "x1OrderPlus ";
1001 Indent (os
, indentG
);
1002 os
<< "x1OrderMinus ";
1007 if (NOT_NULL (basePrime
))
1010 Indent (os
, indentG
);
1016 Indent (os
, indentG
);
1023 indentG
-= stdIndentG
;
1024 Indent (os
, indentG
);
1027 } // FEECurveParameters::Print
1030 DSAAlgorithmId::DSAAlgorithmId()
1033 params
= new DSABsafeParams
;
1035 params
= NULL
; // incomplete initialization of mandatory element!
1039 DSAAlgorithmId::DSAAlgorithmId (const DSAAlgorithmId
&)
1041 Asn1Error
<< "use of incompletely defined DSAAlgorithmId::DSAAlgorithmId (const DSAAlgorithmId &)" << endl
;
1045 DSAAlgorithmId::~DSAAlgorithmId()
1050 AsnType
*DSAAlgorithmId::Clone() const
1052 return new DSAAlgorithmId
;
1055 AsnType
*DSAAlgorithmId::Copy() const
1057 return new DSAAlgorithmId (*this);
1061 DSAAlgorithmId
&DSAAlgorithmId::operator = (const DSAAlgorithmId
&that
)
1062 #else // SNACC_DEEP_COPY
1063 DSAAlgorithmId
&DSAAlgorithmId::operator = (const DSAAlgorithmId
&)
1064 #endif // SNACC_DEEP_COPY
1069 algorithm
= that
.algorithm
;
1073 params
= new DSABsafeParams
;
1074 *params
= *that
.params
;
1084 #else // SNACC_DEEP_COPY
1085 Asn1Error
<< "use of incompletely defined DSAAlgorithmId &DSAAlgorithmId::operator = (const DSAAlgorithmId &)" << endl
;
1087 // if your compiler complains here, check the -novolat option
1088 #endif // SNACC_DEEP_COPY
1092 DSAAlgorithmId::BEncContent (BUF_TYPE b
)
1094 AsnLen totalLen
= 0;
1098 l
= params
->BEncContent (b
);
1099 l
+= BEncConsLen (b
, l
);
1101 l
+= BEncTag1 (b
, UNIV
, CONS
, SEQ_TAG_CODE
);
1104 l
= algorithm
.BEncContent (b
);
1105 l
+= BEncDefLen (b
, l
);
1107 l
+= BEncTag1 (b
, UNIV
, PRIM
, OID_TAG_CODE
);
1111 } // DSAAlgorithmId::BEncContent
1114 void DSAAlgorithmId::BDecContent (BUF_TYPE b
, AsnTag
/*tag0*/, AsnLen elmtLen0
, AsnLen
&bytesDecoded
, ENV_TYPE env
)
1117 AsnLen seqBytesDecoded
= 0;
1119 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
1121 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, OID_TAG_CODE
)))
1123 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
1124 algorithm
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
1125 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
1129 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
1130 SnaccExcep::throwMe(-126);
1133 if ((tag1
== MAKE_TAG_ID (UNIV
, CONS
, SEQ_TAG_CODE
)))
1135 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
1136 params
= new DSABsafeParams
;
1137 params
->BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
1141 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
1142 SnaccExcep::throwMe(-127);
1145 bytesDecoded
+= seqBytesDecoded
;
1146 if (elmtLen0
== INDEFINITE_LEN
)
1148 BDecEoc (b
, bytesDecoded
, env
);
1151 else if (seqBytesDecoded
!= elmtLen0
)
1153 Asn1Error
<< "ERROR - Length discrepancy on sequence." << endl
;
1154 SnaccExcep::throwMe(-128);
1158 } // DSAAlgorithmId::BDecContent
1160 AsnLen
DSAAlgorithmId::BEnc (BUF_TYPE b
)
1163 l
= BEncContent (b
);
1164 l
+= BEncConsLen (b
, l
);
1165 l
+= BEncTag1 (b
, UNIV
, CONS
, SEQ_TAG_CODE
);
1169 void DSAAlgorithmId::BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
)
1174 if ((tag
= BDecTag (b
, bytesDecoded
, env
)) != MAKE_TAG_ID (UNIV
, CONS
, SEQ_TAG_CODE
))
1176 Asn1Error
<< "DSAAlgorithmId::BDec: ERROR - wrong tag" << endl
;
1177 SnaccExcep::throwMe(-129);
1179 elmtLen1
= BDecLen (b
, bytesDecoded
, env
);
1180 BDecContent (b
, tag
, elmtLen1
, bytesDecoded
, env
);
1183 void DSAAlgorithmId::Print (ostream
&os
) const
1186 os
<< "{ -- SEQUENCE --" << endl
;
1187 indentG
+= stdIndentG
;
1190 Indent (os
, indentG
);
1196 if (NOT_NULL (params
))
1198 Indent (os
, indentG
);
1204 Indent (os
, indentG
);
1211 indentG
-= stdIndentG
;
1212 Indent (os
, indentG
);
1215 } // DSAAlgorithmId::Print
1218 FEEElGamalSignature::FEEElGamalSignature()
1222 FEEElGamalSignature::FEEElGamalSignature (const FEEElGamalSignature
&)
1224 Asn1Error
<< "use of incompletely defined FEEElGamalSignature::FEEElGamalSignature (const FEEElGamalSignature &)" << endl
;
1228 FEEElGamalSignature::~FEEElGamalSignature()
1232 AsnType
*FEEElGamalSignature::Clone() const
1234 return new FEEElGamalSignature
;
1237 AsnType
*FEEElGamalSignature::Copy() const
1239 return new FEEElGamalSignature (*this);
1243 FEEElGamalSignature
&FEEElGamalSignature::operator = (const FEEElGamalSignature
&that
)
1244 #else // SNACC_DEEP_COPY
1245 FEEElGamalSignature
&FEEElGamalSignature::operator = (const FEEElGamalSignature
&)
1246 #endif // SNACC_DEEP_COPY
1256 #else // SNACC_DEEP_COPY
1257 Asn1Error
<< "use of incompletely defined FEEElGamalSignature &FEEElGamalSignature::operator = (const FEEElGamalSignature &)" << endl
;
1259 // if your compiler complains here, check the -novolat option
1260 #endif // SNACC_DEEP_COPY
1264 FEEElGamalSignature::BEncContent (BUF_TYPE b
)
1266 AsnLen totalLen
= 0;
1269 l
= pmX
.BEncContent (b
);
1270 l
+= BEncDefLen (b
, l
);
1272 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
1275 l
= u
.BEncContent (b
);
1276 l
+= BEncDefLen (b
, l
);
1278 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
1282 } // FEEElGamalSignature::BEncContent
1285 void FEEElGamalSignature::BDecContent (BUF_TYPE b
, AsnTag
/*tag0*/, AsnLen elmtLen0
, AsnLen
&bytesDecoded
, ENV_TYPE env
)
1288 AsnLen seqBytesDecoded
= 0;
1290 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
1292 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
1293 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
1295 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
1296 u
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
1297 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
1301 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
1302 SnaccExcep::throwMe(-130);
1305 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
1306 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
1308 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
1309 pmX
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
1313 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
1314 SnaccExcep::throwMe(-131);
1317 bytesDecoded
+= seqBytesDecoded
;
1318 if (elmtLen0
== INDEFINITE_LEN
)
1320 BDecEoc (b
, bytesDecoded
, env
);
1323 else if (seqBytesDecoded
!= elmtLen0
)
1325 Asn1Error
<< "ERROR - Length discrepancy on sequence." << endl
;
1326 SnaccExcep::throwMe(-132);
1330 } // FEEElGamalSignature::BDecContent
1332 AsnLen
FEEElGamalSignature::BEnc (BUF_TYPE b
)
1335 l
= BEncContent (b
);
1336 l
+= BEncConsLen (b
, l
);
1337 l
+= BEncTag1 (b
, UNIV
, CONS
, SEQ_TAG_CODE
);
1341 void FEEElGamalSignature::BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
)
1346 if ((tag
= BDecTag (b
, bytesDecoded
, env
)) != MAKE_TAG_ID (UNIV
, CONS
, SEQ_TAG_CODE
))
1348 Asn1Error
<< "FEEElGamalSignature::BDec: ERROR - wrong tag" << endl
;
1349 SnaccExcep::throwMe(-133);
1351 elmtLen1
= BDecLen (b
, bytesDecoded
, env
);
1352 BDecContent (b
, tag
, elmtLen1
, bytesDecoded
, env
);
1355 void FEEElGamalSignature::Print (ostream
&os
) const
1358 os
<< "{ -- SEQUENCE --" << endl
;
1359 indentG
+= stdIndentG
;
1362 Indent (os
, indentG
);
1369 Indent (os
, indentG
);
1375 indentG
-= stdIndentG
;
1376 Indent (os
, indentG
);
1379 } // FEEElGamalSignature::Print
1382 FEEECDSASignature::FEEECDSASignature()
1386 FEEECDSASignature::FEEECDSASignature (const FEEECDSASignature
&)
1388 Asn1Error
<< "use of incompletely defined FEEECDSASignature::FEEECDSASignature (const FEEECDSASignature &)" << endl
;
1392 FEEECDSASignature::~FEEECDSASignature()
1396 AsnType
*FEEECDSASignature::Clone() const
1398 return new FEEECDSASignature
;
1401 AsnType
*FEEECDSASignature::Copy() const
1403 return new FEEECDSASignature (*this);
1407 FEEECDSASignature
&FEEECDSASignature::operator = (const FEEECDSASignature
&that
)
1408 #else // SNACC_DEEP_COPY
1409 FEEECDSASignature
&FEEECDSASignature::operator = (const FEEECDSASignature
&)
1410 #endif // SNACC_DEEP_COPY
1420 #else // SNACC_DEEP_COPY
1421 Asn1Error
<< "use of incompletely defined FEEECDSASignature &FEEECDSASignature::operator = (const FEEECDSASignature &)" << endl
;
1423 // if your compiler complains here, check the -novolat option
1424 #endif // SNACC_DEEP_COPY
1428 FEEECDSASignature::BEncContent (BUF_TYPE b
)
1430 AsnLen totalLen
= 0;
1433 l
= d
.BEncContent (b
);
1434 l
+= BEncDefLen (b
, l
);
1436 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
1439 l
= c
.BEncContent (b
);
1440 l
+= BEncDefLen (b
, l
);
1442 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
1446 } // FEEECDSASignature::BEncContent
1449 void FEEECDSASignature::BDecContent (BUF_TYPE b
, AsnTag
/*tag0*/, AsnLen elmtLen0
, AsnLen
&bytesDecoded
, ENV_TYPE env
)
1452 AsnLen seqBytesDecoded
= 0;
1454 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
1456 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
1457 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
1459 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
1460 c
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
1461 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
1465 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
1466 SnaccExcep::throwMe(-134);
1469 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
1470 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
1472 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
1473 d
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
1477 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
1478 SnaccExcep::throwMe(-135);
1481 bytesDecoded
+= seqBytesDecoded
;
1482 if (elmtLen0
== INDEFINITE_LEN
)
1484 BDecEoc (b
, bytesDecoded
, env
);
1487 else if (seqBytesDecoded
!= elmtLen0
)
1489 Asn1Error
<< "ERROR - Length discrepancy on sequence." << endl
;
1490 SnaccExcep::throwMe(-136);
1494 } // FEEECDSASignature::BDecContent
1496 AsnLen
FEEECDSASignature::BEnc (BUF_TYPE b
)
1499 l
= BEncContent (b
);
1500 l
+= BEncConsLen (b
, l
);
1501 l
+= BEncTag1 (b
, UNIV
, CONS
, SEQ_TAG_CODE
);
1505 void FEEECDSASignature::BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
)
1510 if ((tag
= BDecTag (b
, bytesDecoded
, env
)) != MAKE_TAG_ID (UNIV
, CONS
, SEQ_TAG_CODE
))
1512 Asn1Error
<< "FEEECDSASignature::BDec: ERROR - wrong tag" << endl
;
1513 SnaccExcep::throwMe(-137);
1515 elmtLen1
= BDecLen (b
, bytesDecoded
, env
);
1516 BDecContent (b
, tag
, elmtLen1
, bytesDecoded
, env
);
1519 void FEEECDSASignature::Print (ostream
&os
) const
1522 os
<< "{ -- SEQUENCE --" << endl
;
1523 indentG
+= stdIndentG
;
1526 Indent (os
, indentG
);
1533 Indent (os
, indentG
);
1539 indentG
-= stdIndentG
;
1540 Indent (os
, indentG
);
1543 } // FEEECDSASignature::Print
1546 FEEPublicKey::FEEPublicKey()
1549 curveParams
= new FEECurveParameters
;
1551 curveParams
= NULL
; // incomplete initialization of mandatory element!
1556 FEEPublicKey::FEEPublicKey (const FEEPublicKey
&)
1558 Asn1Error
<< "use of incompletely defined FEEPublicKey::FEEPublicKey (const FEEPublicKey &)" << endl
;
1562 FEEPublicKey::~FEEPublicKey()
1568 AsnType
*FEEPublicKey::Clone() const
1570 return new FEEPublicKey
;
1573 AsnType
*FEEPublicKey::Copy() const
1575 return new FEEPublicKey (*this);
1579 FEEPublicKey
&FEEPublicKey::operator = (const FEEPublicKey
&that
)
1580 #else // SNACC_DEEP_COPY
1581 FEEPublicKey
&FEEPublicKey::operator = (const FEEPublicKey
&)
1582 #endif // SNACC_DEEP_COPY
1587 version
= that
.version
;
1588 if (that
.curveParams
)
1591 curveParams
= new FEECurveParameters
;
1592 *curveParams
= *that
.curveParams
;
1600 minusX
= that
.minusX
;
1604 plusY
= new BigIntegerStr
;
1605 *plusY
= *that
.plusY
;
1615 #else // SNACC_DEEP_COPY
1616 Asn1Error
<< "use of incompletely defined FEEPublicKey &FEEPublicKey::operator = (const FEEPublicKey &)" << endl
;
1618 // if your compiler complains here, check the -novolat option
1619 #endif // SNACC_DEEP_COPY
1623 FEEPublicKey::BEncContent (BUF_TYPE b
)
1625 AsnLen totalLen
= 0;
1628 if (NOT_NULL (plusY
))
1630 l
= plusY
->BEncContent (b
);
1631 l
+= BEncDefLen (b
, l
);
1633 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
1637 l
= minusX
.BEncContent (b
);
1638 l
+= BEncDefLen (b
, l
);
1640 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
1643 l
= plusX
.BEncContent (b
);
1644 l
+= BEncDefLen (b
, l
);
1646 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
1650 l
= curveParams
->BEncContent (b
);
1651 l
+= BEncConsLen (b
, l
);
1653 l
+= BEncTag1 (b
, UNIV
, CONS
, SEQ_TAG_CODE
);
1656 l
= version
.BEncContent (b
);
1657 BEncDefLenTo127 (b
, l
);
1660 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
1664 } // FEEPublicKey::BEncContent
1667 void FEEPublicKey::BDecContent (BUF_TYPE b
, AsnTag
/*tag0*/, AsnLen elmtLen0
, AsnLen
&bytesDecoded
, ENV_TYPE env
)
1670 AsnLen seqBytesDecoded
= 0;
1672 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
1674 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
)))
1676 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
1677 version
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
1678 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
1682 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
1683 SnaccExcep::throwMe(-138);
1686 if ((tag1
== MAKE_TAG_ID (UNIV
, CONS
, SEQ_TAG_CODE
)))
1688 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
1689 curveParams
= new FEECurveParameters
;
1690 curveParams
->BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
1691 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
1695 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
1696 SnaccExcep::throwMe(-139);
1699 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
1700 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
1702 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
1703 plusX
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
1704 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
1708 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
1709 SnaccExcep::throwMe(-140);
1712 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
1713 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
1715 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
1716 minusX
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
1717 if (seqBytesDecoded
== elmtLen0
)
1719 bytesDecoded
+= seqBytesDecoded
;
1724 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
1726 if ((elmtLen0
== INDEFINITE_LEN
) && (tag1
== EOC_TAG_ID
))
1728 BDEC_2ND_EOC_OCTET (b
, seqBytesDecoded
, env
)
1729 bytesDecoded
+= seqBytesDecoded
;
1736 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
1737 SnaccExcep::throwMe(-141);
1740 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
1741 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
1743 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
1744 plusY
= new BigIntegerStr
;
1745 plusY
->BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
1748 bytesDecoded
+= seqBytesDecoded
;
1749 if (elmtLen0
== INDEFINITE_LEN
)
1751 BDecEoc (b
, bytesDecoded
, env
);
1754 else if (seqBytesDecoded
!= elmtLen0
)
1756 Asn1Error
<< "ERROR - Length discrepancy on sequence." << endl
;
1757 SnaccExcep::throwMe(-142);
1761 } // FEEPublicKey::BDecContent
1763 AsnLen
FEEPublicKey::BEnc (BUF_TYPE b
)
1766 l
= BEncContent (b
);
1767 l
+= BEncConsLen (b
, l
);
1768 l
+= BEncTag1 (b
, UNIV
, CONS
, SEQ_TAG_CODE
);
1772 void FEEPublicKey::BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
)
1777 if ((tag
= BDecTag (b
, bytesDecoded
, env
)) != MAKE_TAG_ID (UNIV
, CONS
, SEQ_TAG_CODE
))
1779 Asn1Error
<< "FEEPublicKey::BDec: ERROR - wrong tag" << endl
;
1780 SnaccExcep::throwMe(-143);
1782 elmtLen1
= BDecLen (b
, bytesDecoded
, env
);
1783 BDecContent (b
, tag
, elmtLen1
, bytesDecoded
, env
);
1786 void FEEPublicKey::Print (ostream
&os
) const
1789 os
<< "{ -- SEQUENCE --" << endl
;
1790 indentG
+= stdIndentG
;
1793 Indent (os
, indentG
);
1799 if (NOT_NULL (curveParams
))
1801 Indent (os
, indentG
);
1802 os
<< "curveParams ";
1807 Indent (os
, indentG
);
1808 os
<< "curveParams ";
1814 Indent (os
, indentG
);
1821 Indent (os
, indentG
);
1827 if (NOT_NULL (plusY
))
1830 Indent (os
, indentG
);
1836 Indent (os
, indentG
);
1843 indentG
-= stdIndentG
;
1844 Indent (os
, indentG
);
1847 } // FEEPublicKey::Print
1850 FEEPrivateKey::FEEPrivateKey()
1853 curveParams
= new FEECurveParameters
;
1855 curveParams
= NULL
; // incomplete initialization of mandatory element!
1859 FEEPrivateKey::FEEPrivateKey (const FEEPrivateKey
&)
1861 Asn1Error
<< "use of incompletely defined FEEPrivateKey::FEEPrivateKey (const FEEPrivateKey &)" << endl
;
1865 FEEPrivateKey::~FEEPrivateKey()
1870 AsnType
*FEEPrivateKey::Clone() const
1872 return new FEEPrivateKey
;
1875 AsnType
*FEEPrivateKey::Copy() const
1877 return new FEEPrivateKey (*this);
1881 FEEPrivateKey
&FEEPrivateKey::operator = (const FEEPrivateKey
&that
)
1882 #else // SNACC_DEEP_COPY
1883 FEEPrivateKey
&FEEPrivateKey::operator = (const FEEPrivateKey
&)
1884 #endif // SNACC_DEEP_COPY
1889 version
= that
.version
;
1890 if (that
.curveParams
)
1893 curveParams
= new FEECurveParameters
;
1894 *curveParams
= *that
.curveParams
;
1901 privData
= that
.privData
;
1905 #else // SNACC_DEEP_COPY
1906 Asn1Error
<< "use of incompletely defined FEEPrivateKey &FEEPrivateKey::operator = (const FEEPrivateKey &)" << endl
;
1908 // if your compiler complains here, check the -novolat option
1909 #endif // SNACC_DEEP_COPY
1913 FEEPrivateKey::BEncContent (BUF_TYPE b
)
1915 AsnLen totalLen
= 0;
1918 l
= privData
.BEncContent (b
);
1919 l
+= BEncDefLen (b
, l
);
1921 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
1925 l
= curveParams
->BEncContent (b
);
1926 l
+= BEncConsLen (b
, l
);
1928 l
+= BEncTag1 (b
, UNIV
, CONS
, SEQ_TAG_CODE
);
1931 l
= version
.BEncContent (b
);
1932 BEncDefLenTo127 (b
, l
);
1935 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
1939 } // FEEPrivateKey::BEncContent
1942 void FEEPrivateKey::BDecContent (BUF_TYPE b
, AsnTag
/*tag0*/, AsnLen elmtLen0
, AsnLen
&bytesDecoded
, ENV_TYPE env
)
1945 AsnLen seqBytesDecoded
= 0;
1947 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
1949 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
)))
1951 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
1952 version
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
1953 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
1957 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
1958 SnaccExcep::throwMe(-144);
1961 if ((tag1
== MAKE_TAG_ID (UNIV
, CONS
, SEQ_TAG_CODE
)))
1963 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
1964 curveParams
= new FEECurveParameters
;
1965 curveParams
->BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
1966 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
1970 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
1971 SnaccExcep::throwMe(-145);
1974 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
1975 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
1977 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
1978 privData
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
1982 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
1983 SnaccExcep::throwMe(-146);
1986 bytesDecoded
+= seqBytesDecoded
;
1987 if (elmtLen0
== INDEFINITE_LEN
)
1989 BDecEoc (b
, bytesDecoded
, env
);
1992 else if (seqBytesDecoded
!= elmtLen0
)
1994 Asn1Error
<< "ERROR - Length discrepancy on sequence." << endl
;
1995 SnaccExcep::throwMe(-147);
1999 } // FEEPrivateKey::BDecContent
2001 AsnLen
FEEPrivateKey::BEnc (BUF_TYPE b
)
2004 l
= BEncContent (b
);
2005 l
+= BEncConsLen (b
, l
);
2006 l
+= BEncTag1 (b
, UNIV
, CONS
, SEQ_TAG_CODE
);
2010 void FEEPrivateKey::BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
)
2015 if ((tag
= BDecTag (b
, bytesDecoded
, env
)) != MAKE_TAG_ID (UNIV
, CONS
, SEQ_TAG_CODE
))
2017 Asn1Error
<< "FEEPrivateKey::BDec: ERROR - wrong tag" << endl
;
2018 SnaccExcep::throwMe(-148);
2020 elmtLen1
= BDecLen (b
, bytesDecoded
, env
);
2021 BDecContent (b
, tag
, elmtLen1
, bytesDecoded
, env
);
2024 void FEEPrivateKey::Print (ostream
&os
) const
2027 os
<< "{ -- SEQUENCE --" << endl
;
2028 indentG
+= stdIndentG
;
2031 Indent (os
, indentG
);
2037 if (NOT_NULL (curveParams
))
2039 Indent (os
, indentG
);
2040 os
<< "curveParams ";
2045 Indent (os
, indentG
);
2046 os
<< "curveParams ";
2052 Indent (os
, indentG
);
2058 indentG
-= stdIndentG
;
2059 Indent (os
, indentG
);
2062 } // FEEPrivateKey::Print
2065 DSAPrivateKey::DSAPrivateKey()
2068 dsaAlg
= new DSAAlgorithmId
;
2070 dsaAlg
= NULL
; // incomplete initialization of mandatory element!
2074 DSAPrivateKey::DSAPrivateKey (const DSAPrivateKey
&)
2076 Asn1Error
<< "use of incompletely defined DSAPrivateKey::DSAPrivateKey (const DSAPrivateKey &)" << endl
;
2080 DSAPrivateKey::~DSAPrivateKey()
2085 AsnType
*DSAPrivateKey::Clone() const
2087 return new DSAPrivateKey
;
2090 AsnType
*DSAPrivateKey::Copy() const
2092 return new DSAPrivateKey (*this);
2096 DSAPrivateKey
&DSAPrivateKey::operator = (const DSAPrivateKey
&that
)
2097 #else // SNACC_DEEP_COPY
2098 DSAPrivateKey
&DSAPrivateKey::operator = (const DSAPrivateKey
&)
2099 #endif // SNACC_DEEP_COPY
2104 version
= that
.version
;
2108 dsaAlg
= new DSAAlgorithmId
;
2109 *dsaAlg
= *that
.dsaAlg
;
2116 privateKey
= that
.privateKey
;
2120 #else // SNACC_DEEP_COPY
2121 Asn1Error
<< "use of incompletely defined DSAPrivateKey &DSAPrivateKey::operator = (const DSAPrivateKey &)" << endl
;
2123 // if your compiler complains here, check the -novolat option
2124 #endif // SNACC_DEEP_COPY
2128 DSAPrivateKey::BEncContent (BUF_TYPE b
)
2130 AsnLen totalLen
= 0;
2133 l
= privateKey
.BEncContent (b
);
2134 l
+= BEncDefLen (b
, l
);
2136 l
+= BEncTag1 (b
, UNIV
, PRIM
, OCTETSTRING_TAG_CODE
);
2140 l
= dsaAlg
->BEncContent (b
);
2141 l
+= BEncConsLen (b
, l
);
2143 l
+= BEncTag1 (b
, UNIV
, CONS
, SEQ_TAG_CODE
);
2146 l
= version
.BEncContent (b
);
2147 BEncDefLenTo127 (b
, l
);
2150 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
2154 } // DSAPrivateKey::BEncContent
2157 void DSAPrivateKey::BDecContent (BUF_TYPE b
, AsnTag
/*tag0*/, AsnLen elmtLen0
, AsnLen
&bytesDecoded
, ENV_TYPE env
)
2160 AsnLen seqBytesDecoded
= 0;
2162 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
2164 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
)))
2166 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
2167 version
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
2168 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
2172 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
2173 SnaccExcep::throwMe(-149);
2176 if ((tag1
== MAKE_TAG_ID (UNIV
, CONS
, SEQ_TAG_CODE
)))
2178 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
2179 dsaAlg
= new DSAAlgorithmId
;
2180 dsaAlg
->BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
2181 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
2185 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
2186 SnaccExcep::throwMe(-150);
2189 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, OCTETSTRING_TAG_CODE
))
2190 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, OCTETSTRING_TAG_CODE
)))
2192 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
2193 privateKey
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
2197 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
2198 SnaccExcep::throwMe(-151);
2201 bytesDecoded
+= seqBytesDecoded
;
2202 if (elmtLen0
== INDEFINITE_LEN
)
2204 BDecEoc (b
, bytesDecoded
, env
);
2207 else if (seqBytesDecoded
!= elmtLen0
)
2209 Asn1Error
<< "ERROR - Length discrepancy on sequence." << endl
;
2210 SnaccExcep::throwMe(-152);
2214 } // DSAPrivateKey::BDecContent
2216 AsnLen
DSAPrivateKey::BEnc (BUF_TYPE b
)
2219 l
= BEncContent (b
);
2220 l
+= BEncConsLen (b
, l
);
2221 l
+= BEncTag1 (b
, UNIV
, CONS
, SEQ_TAG_CODE
);
2225 void DSAPrivateKey::BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
)
2230 if ((tag
= BDecTag (b
, bytesDecoded
, env
)) != MAKE_TAG_ID (UNIV
, CONS
, SEQ_TAG_CODE
))
2232 Asn1Error
<< "DSAPrivateKey::BDec: ERROR - wrong tag" << endl
;
2233 SnaccExcep::throwMe(-153);
2235 elmtLen1
= BDecLen (b
, bytesDecoded
, env
);
2236 BDecContent (b
, tag
, elmtLen1
, bytesDecoded
, env
);
2239 void DSAPrivateKey::Print (ostream
&os
) const
2242 os
<< "{ -- SEQUENCE --" << endl
;
2243 indentG
+= stdIndentG
;
2246 Indent (os
, indentG
);
2252 if (NOT_NULL (dsaAlg
))
2254 Indent (os
, indentG
);
2260 Indent (os
, indentG
);
2267 Indent (os
, indentG
);
2268 os
<< "privateKey ";
2273 indentG
-= stdIndentG
;
2274 Indent (os
, indentG
);
2277 } // DSAPrivateKey::Print
2280 DSAPublicKey::DSAPublicKey()
2283 dsaAlg
= new DSAAlgorithmId
;
2285 dsaAlg
= NULL
; // incomplete initialization of mandatory element!
2289 DSAPublicKey::DSAPublicKey (const DSAPublicKey
&)
2291 Asn1Error
<< "use of incompletely defined DSAPublicKey::DSAPublicKey (const DSAPublicKey &)" << endl
;
2295 DSAPublicKey::~DSAPublicKey()
2300 AsnType
*DSAPublicKey::Clone() const
2302 return new DSAPublicKey
;
2305 AsnType
*DSAPublicKey::Copy() const
2307 return new DSAPublicKey (*this);
2311 DSAPublicKey
&DSAPublicKey::operator = (const DSAPublicKey
&that
)
2312 #else // SNACC_DEEP_COPY
2313 DSAPublicKey
&DSAPublicKey::operator = (const DSAPublicKey
&)
2314 #endif // SNACC_DEEP_COPY
2322 dsaAlg
= new DSAAlgorithmId
;
2323 *dsaAlg
= *that
.dsaAlg
;
2330 publicKey
= that
.publicKey
;
2334 #else // SNACC_DEEP_COPY
2335 Asn1Error
<< "use of incompletely defined DSAPublicKey &DSAPublicKey::operator = (const DSAPublicKey &)" << endl
;
2337 // if your compiler complains here, check the -novolat option
2338 #endif // SNACC_DEEP_COPY
2342 DSAPublicKey::BEncContent (BUF_TYPE b
)
2344 AsnLen totalLen
= 0;
2347 l
= publicKey
.BEncContent (b
);
2348 l
+= BEncDefLen (b
, l
);
2350 l
+= BEncTag1 (b
, UNIV
, PRIM
, BITSTRING_TAG_CODE
);
2354 l
= dsaAlg
->BEncContent (b
);
2355 l
+= BEncConsLen (b
, l
);
2357 l
+= BEncTag1 (b
, UNIV
, CONS
, SEQ_TAG_CODE
);
2361 } // DSAPublicKey::BEncContent
2364 void DSAPublicKey::BDecContent (BUF_TYPE b
, AsnTag
/*tag0*/, AsnLen elmtLen0
, AsnLen
&bytesDecoded
, ENV_TYPE env
)
2367 AsnLen seqBytesDecoded
= 0;
2369 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
2371 if ((tag1
== MAKE_TAG_ID (UNIV
, CONS
, SEQ_TAG_CODE
)))
2373 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
2374 dsaAlg
= new DSAAlgorithmId
;
2375 dsaAlg
->BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
2376 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
2380 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
2381 SnaccExcep::throwMe(-154);
2384 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, BITSTRING_TAG_CODE
))
2385 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, BITSTRING_TAG_CODE
)))
2387 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
2388 publicKey
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
2392 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
2393 SnaccExcep::throwMe(-155);
2396 bytesDecoded
+= seqBytesDecoded
;
2397 if (elmtLen0
== INDEFINITE_LEN
)
2399 BDecEoc (b
, bytesDecoded
, env
);
2402 else if (seqBytesDecoded
!= elmtLen0
)
2404 Asn1Error
<< "ERROR - Length discrepancy on sequence." << endl
;
2405 SnaccExcep::throwMe(-156);
2409 } // DSAPublicKey::BDecContent
2411 AsnLen
DSAPublicKey::BEnc (BUF_TYPE b
)
2414 l
= BEncContent (b
);
2415 l
+= BEncConsLen (b
, l
);
2416 l
+= BEncTag1 (b
, UNIV
, CONS
, SEQ_TAG_CODE
);
2420 void DSAPublicKey::BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
)
2425 if ((tag
= BDecTag (b
, bytesDecoded
, env
)) != MAKE_TAG_ID (UNIV
, CONS
, SEQ_TAG_CODE
))
2427 Asn1Error
<< "DSAPublicKey::BDec: ERROR - wrong tag" << endl
;
2428 SnaccExcep::throwMe(-157);
2430 elmtLen1
= BDecLen (b
, bytesDecoded
, env
);
2431 BDecContent (b
, tag
, elmtLen1
, bytesDecoded
, env
);
2434 void DSAPublicKey::Print (ostream
&os
) const
2437 os
<< "{ -- SEQUENCE --" << endl
;
2438 indentG
+= stdIndentG
;
2440 if (NOT_NULL (dsaAlg
))
2442 Indent (os
, indentG
);
2448 Indent (os
, indentG
);
2455 Indent (os
, indentG
);
2461 indentG
-= stdIndentG
;
2462 Indent (os
, indentG
);
2465 } // DSAPublicKey::Print
2468 DSAPrivateKeyOcts::DSAPrivateKeyOcts()
2472 DSAPrivateKeyOcts::DSAPrivateKeyOcts (const DSAPrivateKeyOcts
&)
2474 Asn1Error
<< "use of incompletely defined DSAPrivateKeyOcts::DSAPrivateKeyOcts (const DSAPrivateKeyOcts &)" << endl
;
2478 DSAPrivateKeyOcts::~DSAPrivateKeyOcts()
2482 AsnType
*DSAPrivateKeyOcts::Clone() const
2484 return new DSAPrivateKeyOcts
;
2487 AsnType
*DSAPrivateKeyOcts::Copy() const
2489 return new DSAPrivateKeyOcts (*this);
2493 DSAPrivateKeyOcts
&DSAPrivateKeyOcts::operator = (const DSAPrivateKeyOcts
&that
)
2494 #else // SNACC_DEEP_COPY
2495 DSAPrivateKeyOcts
&DSAPrivateKeyOcts::operator = (const DSAPrivateKeyOcts
&)
2496 #endif // SNACC_DEEP_COPY
2501 privateKey
= that
.privateKey
;
2505 #else // SNACC_DEEP_COPY
2506 Asn1Error
<< "use of incompletely defined DSAPrivateKeyOcts &DSAPrivateKeyOcts::operator = (const DSAPrivateKeyOcts &)" << endl
;
2508 // if your compiler complains here, check the -novolat option
2509 #endif // SNACC_DEEP_COPY
2513 DSAPrivateKeyOcts::BEncContent (BUF_TYPE b
)
2515 AsnLen totalLen
= 0;
2518 l
= privateKey
.BEncContent (b
);
2519 l
+= BEncDefLen (b
, l
);
2521 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
2525 } // DSAPrivateKeyOcts::BEncContent
2528 void DSAPrivateKeyOcts::BDecContent (BUF_TYPE b
, AsnTag
/*tag0*/, AsnLen elmtLen0
, AsnLen
&bytesDecoded
, ENV_TYPE env
)
2531 AsnLen seqBytesDecoded
= 0;
2533 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
2535 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
2536 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
2538 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
2539 privateKey
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
2543 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
2544 SnaccExcep::throwMe(-158);
2547 bytesDecoded
+= seqBytesDecoded
;
2548 if (elmtLen0
== INDEFINITE_LEN
)
2550 BDecEoc (b
, bytesDecoded
, env
);
2553 else if (seqBytesDecoded
!= elmtLen0
)
2555 Asn1Error
<< "ERROR - Length discrepancy on sequence." << endl
;
2556 SnaccExcep::throwMe(-159);
2560 } // DSAPrivateKeyOcts::BDecContent
2562 AsnLen
DSAPrivateKeyOcts::BEnc (BUF_TYPE b
)
2565 l
= BEncContent (b
);
2566 l
+= BEncConsLen (b
, l
);
2567 l
+= BEncTag1 (b
, UNIV
, CONS
, SEQ_TAG_CODE
);
2571 void DSAPrivateKeyOcts::BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
)
2576 if ((tag
= BDecTag (b
, bytesDecoded
, env
)) != MAKE_TAG_ID (UNIV
, CONS
, SEQ_TAG_CODE
))
2578 Asn1Error
<< "DSAPrivateKeyOcts::BDec: ERROR - wrong tag" << endl
;
2579 SnaccExcep::throwMe(-160);
2581 elmtLen1
= BDecLen (b
, bytesDecoded
, env
);
2582 BDecContent (b
, tag
, elmtLen1
, bytesDecoded
, env
);
2585 void DSAPrivateKeyOcts::Print (ostream
&os
) const
2588 os
<< "{ -- SEQUENCE --" << endl
;
2589 indentG
+= stdIndentG
;
2592 Indent (os
, indentG
);
2593 os
<< "privateKey ";
2598 indentG
-= stdIndentG
;
2599 Indent (os
, indentG
);
2602 } // DSAPrivateKeyOcts::Print
2605 DSASignature::DSASignature()
2609 DSASignature::DSASignature (const DSASignature
&)
2611 Asn1Error
<< "use of incompletely defined DSASignature::DSASignature (const DSASignature &)" << endl
;
2615 DSASignature::~DSASignature()
2619 AsnType
*DSASignature::Clone() const
2621 return new DSASignature
;
2624 AsnType
*DSASignature::Copy() const
2626 return new DSASignature (*this);
2630 DSASignature
&DSASignature::operator = (const DSASignature
&that
)
2631 #else // SNACC_DEEP_COPY
2632 DSASignature
&DSASignature::operator = (const DSASignature
&)
2633 #endif // SNACC_DEEP_COPY
2643 #else // SNACC_DEEP_COPY
2644 Asn1Error
<< "use of incompletely defined DSASignature &DSASignature::operator = (const DSASignature &)" << endl
;
2646 // if your compiler complains here, check the -novolat option
2647 #endif // SNACC_DEEP_COPY
2651 DSASignature::BEncContent (BUF_TYPE b
)
2653 AsnLen totalLen
= 0;
2656 l
= s
.BEncContent (b
);
2657 l
+= BEncDefLen (b
, l
);
2659 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
2662 l
= r
.BEncContent (b
);
2663 l
+= BEncDefLen (b
, l
);
2665 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
2669 } // DSASignature::BEncContent
2672 void DSASignature::BDecContent (BUF_TYPE b
, AsnTag
/*tag0*/, AsnLen elmtLen0
, AsnLen
&bytesDecoded
, ENV_TYPE env
)
2675 AsnLen seqBytesDecoded
= 0;
2677 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
2679 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
2680 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
2682 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
2683 r
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
2684 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
2688 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
2689 SnaccExcep::throwMe(-161);
2692 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
2693 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
2695 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
2696 s
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
2700 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
2701 SnaccExcep::throwMe(-162);
2704 bytesDecoded
+= seqBytesDecoded
;
2705 if (elmtLen0
== INDEFINITE_LEN
)
2707 BDecEoc (b
, bytesDecoded
, env
);
2710 else if (seqBytesDecoded
!= elmtLen0
)
2712 Asn1Error
<< "ERROR - Length discrepancy on sequence." << endl
;
2713 SnaccExcep::throwMe(-163);
2717 } // DSASignature::BDecContent
2719 AsnLen
DSASignature::BEnc (BUF_TYPE b
)
2722 l
= BEncContent (b
);
2723 l
+= BEncConsLen (b
, l
);
2724 l
+= BEncTag1 (b
, UNIV
, CONS
, SEQ_TAG_CODE
);
2728 void DSASignature::BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
)
2733 if ((tag
= BDecTag (b
, bytesDecoded
, env
)) != MAKE_TAG_ID (UNIV
, CONS
, SEQ_TAG_CODE
))
2735 Asn1Error
<< "DSASignature::BDec: ERROR - wrong tag" << endl
;
2736 SnaccExcep::throwMe(-164);
2738 elmtLen1
= BDecLen (b
, bytesDecoded
, env
);
2739 BDecContent (b
, tag
, elmtLen1
, bytesDecoded
, env
);
2742 void DSASignature::Print (ostream
&os
) const
2745 os
<< "{ -- SEQUENCE --" << endl
;
2746 indentG
+= stdIndentG
;
2749 Indent (os
, indentG
);
2756 Indent (os
, indentG
);
2762 indentG
-= stdIndentG
;
2763 Indent (os
, indentG
);
2766 } // DSASignature::Print
2769 DSAAlgParams::DSAAlgParams()
2773 DSAAlgParams::DSAAlgParams (const DSAAlgParams
&)
2775 Asn1Error
<< "use of incompletely defined DSAAlgParams::DSAAlgParams (const DSAAlgParams &)" << endl
;
2779 DSAAlgParams::~DSAAlgParams()
2783 AsnType
*DSAAlgParams::Clone() const
2785 return new DSAAlgParams
;
2788 AsnType
*DSAAlgParams::Copy() const
2790 return new DSAAlgParams (*this);
2794 DSAAlgParams
&DSAAlgParams::operator = (const DSAAlgParams
&that
)
2795 #else // SNACC_DEEP_COPY
2796 DSAAlgParams
&DSAAlgParams::operator = (const DSAAlgParams
&)
2797 #endif // SNACC_DEEP_COPY
2808 #else // SNACC_DEEP_COPY
2809 Asn1Error
<< "use of incompletely defined DSAAlgParams &DSAAlgParams::operator = (const DSAAlgParams &)" << endl
;
2811 // if your compiler complains here, check the -novolat option
2812 #endif // SNACC_DEEP_COPY
2816 DSAAlgParams::BEncContent (BUF_TYPE b
)
2818 AsnLen totalLen
= 0;
2821 l
= g
.BEncContent (b
);
2822 l
+= BEncDefLen (b
, l
);
2824 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
2827 l
= q
.BEncContent (b
);
2828 l
+= BEncDefLen (b
, l
);
2830 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
2833 l
= p
.BEncContent (b
);
2834 l
+= BEncDefLen (b
, l
);
2836 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
2840 } // DSAAlgParams::BEncContent
2843 void DSAAlgParams::BDecContent (BUF_TYPE b
, AsnTag
/*tag0*/, AsnLen elmtLen0
, AsnLen
&bytesDecoded
, ENV_TYPE env
)
2846 AsnLen seqBytesDecoded
= 0;
2848 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
2850 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
2851 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
2853 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
2854 p
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
2855 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
2859 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
2860 SnaccExcep::throwMe(-165);
2863 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
2864 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
2866 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
2867 q
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
2868 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
2872 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
2873 SnaccExcep::throwMe(-166);
2876 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
2877 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
2879 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
2880 g
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
2884 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
2885 SnaccExcep::throwMe(-167);
2888 bytesDecoded
+= seqBytesDecoded
;
2889 if (elmtLen0
== INDEFINITE_LEN
)
2891 BDecEoc (b
, bytesDecoded
, env
);
2894 else if (seqBytesDecoded
!= elmtLen0
)
2896 Asn1Error
<< "ERROR - Length discrepancy on sequence." << endl
;
2897 SnaccExcep::throwMe(-168);
2901 } // DSAAlgParams::BDecContent
2903 AsnLen
DSAAlgParams::BEnc (BUF_TYPE b
)
2906 l
= BEncContent (b
);
2907 l
+= BEncConsLen (b
, l
);
2908 l
+= BEncTag1 (b
, UNIV
, CONS
, SEQ_TAG_CODE
);
2912 void DSAAlgParams::BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
)
2917 if ((tag
= BDecTag (b
, bytesDecoded
, env
)) != MAKE_TAG_ID (UNIV
, CONS
, SEQ_TAG_CODE
))
2919 Asn1Error
<< "DSAAlgParams::BDec: ERROR - wrong tag" << endl
;
2920 SnaccExcep::throwMe(-169);
2922 elmtLen1
= BDecLen (b
, bytesDecoded
, env
);
2923 BDecContent (b
, tag
, elmtLen1
, bytesDecoded
, env
);
2926 void DSAAlgParams::Print (ostream
&os
) const
2929 os
<< "{ -- SEQUENCE --" << endl
;
2930 indentG
+= stdIndentG
;
2933 Indent (os
, indentG
);
2940 Indent (os
, indentG
);
2947 Indent (os
, indentG
);
2953 indentG
-= stdIndentG
;
2954 Indent (os
, indentG
);
2957 } // DSAAlgParams::Print
2960 DHPrivateKey::DHPrivateKey()
2963 params
= new DHParameter
;
2965 params
= NULL
; // incomplete initialization of mandatory element!
2969 DHPrivateKey::DHPrivateKey (const DHPrivateKey
&)
2971 Asn1Error
<< "use of incompletely defined DHPrivateKey::DHPrivateKey (const DHPrivateKey &)" << endl
;
2975 DHPrivateKey::~DHPrivateKey()
2980 AsnType
*DHPrivateKey::Clone() const
2982 return new DHPrivateKey
;
2985 AsnType
*DHPrivateKey::Copy() const
2987 return new DHPrivateKey (*this);
2991 DHPrivateKey
&DHPrivateKey::operator = (const DHPrivateKey
&that
)
2992 #else // SNACC_DEEP_COPY
2993 DHPrivateKey
&DHPrivateKey::operator = (const DHPrivateKey
&)
2994 #endif // SNACC_DEEP_COPY
3003 params
= new DHParameter
;
3004 *params
= *that
.params
;
3011 secretPart
= that
.secretPart
;
3015 #else // SNACC_DEEP_COPY
3016 Asn1Error
<< "use of incompletely defined DHPrivateKey &DHPrivateKey::operator = (const DHPrivateKey &)" << endl
;
3018 // if your compiler complains here, check the -novolat option
3019 #endif // SNACC_DEEP_COPY
3023 DHPrivateKey::BEncContent (BUF_TYPE b
)
3025 AsnLen totalLen
= 0;
3028 l
= secretPart
.BEncContent (b
);
3029 l
+= BEncDefLen (b
, l
);
3031 l
+= BEncTag1 (b
, UNIV
, PRIM
, INTEGER_TAG_CODE
);
3035 l
= params
->BEncContent (b
);
3036 l
+= BEncConsLen (b
, l
);
3038 l
+= BEncTag1 (b
, UNIV
, CONS
, SEQ_TAG_CODE
);
3041 l
= dHOid
.BEncContent (b
);
3042 l
+= BEncDefLen (b
, l
);
3044 l
+= BEncTag1 (b
, UNIV
, PRIM
, OID_TAG_CODE
);
3048 } // DHPrivateKey::BEncContent
3051 void DHPrivateKey::BDecContent (BUF_TYPE b
, AsnTag
/*tag0*/, AsnLen elmtLen0
, AsnLen
&bytesDecoded
, ENV_TYPE env
)
3054 AsnLen seqBytesDecoded
= 0;
3056 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
3058 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, OID_TAG_CODE
)))
3060 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
3061 dHOid
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
3062 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
3066 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
3067 SnaccExcep::throwMe(-170);
3070 if ((tag1
== MAKE_TAG_ID (UNIV
, CONS
, SEQ_TAG_CODE
)))
3072 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
3073 params
= new DHParameter
;
3074 params
->BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
3075 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
3079 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
3080 SnaccExcep::throwMe(-171);
3083 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, INTEGER_TAG_CODE
))
3084 || (tag1
== MAKE_TAG_ID (UNIV
, CONS
, INTEGER_TAG_CODE
)))
3086 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
3087 secretPart
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
3091 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
3092 SnaccExcep::throwMe(-172);
3095 bytesDecoded
+= seqBytesDecoded
;
3096 if (elmtLen0
== INDEFINITE_LEN
)
3098 BDecEoc (b
, bytesDecoded
, env
);
3101 else if (seqBytesDecoded
!= elmtLen0
)
3103 Asn1Error
<< "ERROR - Length discrepancy on sequence." << endl
;
3104 SnaccExcep::throwMe(-173);
3108 } // DHPrivateKey::BDecContent
3110 AsnLen
DHPrivateKey::BEnc (BUF_TYPE b
)
3113 l
= BEncContent (b
);
3114 l
+= BEncConsLen (b
, l
);
3115 l
+= BEncTag1 (b
, UNIV
, CONS
, SEQ_TAG_CODE
);
3119 void DHPrivateKey::BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
)
3124 if ((tag
= BDecTag (b
, bytesDecoded
, env
)) != MAKE_TAG_ID (UNIV
, CONS
, SEQ_TAG_CODE
))
3126 Asn1Error
<< "DHPrivateKey::BDec: ERROR - wrong tag" << endl
;
3127 SnaccExcep::throwMe(-174);
3129 elmtLen1
= BDecLen (b
, bytesDecoded
, env
);
3130 BDecContent (b
, tag
, elmtLen1
, bytesDecoded
, env
);
3133 void DHPrivateKey::Print (ostream
&os
) const
3136 os
<< "{ -- SEQUENCE --" << endl
;
3137 indentG
+= stdIndentG
;
3140 Indent (os
, indentG
);
3146 if (NOT_NULL (params
))
3148 Indent (os
, indentG
);
3154 Indent (os
, indentG
);
3161 Indent (os
, indentG
);
3162 os
<< "secretPart ";
3167 indentG
-= stdIndentG
;
3168 Indent (os
, indentG
);
3171 } // DHPrivateKey::Print
3174 DHParameterBlock::DHParameterBlock()
3177 params
= new DHParameter
;
3179 params
= NULL
; // incomplete initialization of mandatory element!
3183 DHParameterBlock::DHParameterBlock (const DHParameterBlock
&)
3185 Asn1Error
<< "use of incompletely defined DHParameterBlock::DHParameterBlock (const DHParameterBlock &)" << endl
;
3189 DHParameterBlock::~DHParameterBlock()
3194 AsnType
*DHParameterBlock::Clone() const
3196 return new DHParameterBlock
;
3199 AsnType
*DHParameterBlock::Copy() const
3201 return new DHParameterBlock (*this);
3205 DHParameterBlock
&DHParameterBlock::operator = (const DHParameterBlock
&that
)
3206 #else // SNACC_DEEP_COPY
3207 DHParameterBlock
&DHParameterBlock::operator = (const DHParameterBlock
&)
3208 #endif // SNACC_DEEP_COPY
3217 params
= new DHParameter
;
3218 *params
= *that
.params
;
3228 #else // SNACC_DEEP_COPY
3229 Asn1Error
<< "use of incompletely defined DHParameterBlock &DHParameterBlock::operator = (const DHParameterBlock &)" << endl
;
3231 // if your compiler complains here, check the -novolat option
3232 #endif // SNACC_DEEP_COPY
3236 DHParameterBlock::BEncContent (BUF_TYPE b
)
3238 AsnLen totalLen
= 0;
3242 l
= params
->BEncContent (b
);
3243 l
+= BEncConsLen (b
, l
);
3245 l
+= BEncTag1 (b
, UNIV
, CONS
, SEQ_TAG_CODE
);
3248 l
= oid
.BEncContent (b
);
3249 l
+= BEncDefLen (b
, l
);
3251 l
+= BEncTag1 (b
, UNIV
, PRIM
, OID_TAG_CODE
);
3255 } // DHParameterBlock::BEncContent
3258 void DHParameterBlock::BDecContent (BUF_TYPE b
, AsnTag
/*tag0*/, AsnLen elmtLen0
, AsnLen
&bytesDecoded
, ENV_TYPE env
)
3261 AsnLen seqBytesDecoded
= 0;
3263 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
3265 if ((tag1
== MAKE_TAG_ID (UNIV
, PRIM
, OID_TAG_CODE
)))
3267 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
3268 oid
.BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
3269 tag1
= BDecTag (b
, seqBytesDecoded
, env
);
3273 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
3274 SnaccExcep::throwMe(-175);
3277 if ((tag1
== MAKE_TAG_ID (UNIV
, CONS
, SEQ_TAG_CODE
)))
3279 elmtLen1
= BDecLen (b
, seqBytesDecoded
, env
);
3280 params
= new DHParameter
;
3281 params
->BDecContent (b
, tag1
, elmtLen1
, seqBytesDecoded
, env
);
3285 Asn1Error
<< "ERROR - SEQUENCE is missing non-optional elmt." << endl
;
3286 SnaccExcep::throwMe(-176);
3289 bytesDecoded
+= seqBytesDecoded
;
3290 if (elmtLen0
== INDEFINITE_LEN
)
3292 BDecEoc (b
, bytesDecoded
, env
);
3295 else if (seqBytesDecoded
!= elmtLen0
)
3297 Asn1Error
<< "ERROR - Length discrepancy on sequence." << endl
;
3298 SnaccExcep::throwMe(-177);
3302 } // DHParameterBlock::BDecContent
3304 AsnLen
DHParameterBlock::BEnc (BUF_TYPE b
)
3307 l
= BEncContent (b
);
3308 l
+= BEncConsLen (b
, l
);
3309 l
+= BEncTag1 (b
, UNIV
, CONS
, SEQ_TAG_CODE
);
3313 void DHParameterBlock::BDec (BUF_TYPE b
, AsnLen
&bytesDecoded
, ENV_TYPE env
)
3318 if ((tag
= BDecTag (b
, bytesDecoded
, env
)) != MAKE_TAG_ID (UNIV
, CONS
, SEQ_TAG_CODE
))
3320 Asn1Error
<< "DHParameterBlock::BDec: ERROR - wrong tag" << endl
;
3321 SnaccExcep::throwMe(-178);
3323 elmtLen1
= BDecLen (b
, bytesDecoded
, env
);
3324 BDecContent (b
, tag
, elmtLen1
, bytesDecoded
, env
);
3327 void DHParameterBlock::Print (ostream
&os
) const
3330 os
<< "{ -- SEQUENCE --" << endl
;
3331 indentG
+= stdIndentG
;
3334 Indent (os
, indentG
);
3340 if (NOT_NULL (params
))
3342 Indent (os
, indentG
);
3348 Indent (os
, indentG
);
3355 indentG
-= stdIndentG
;
3356 Indent (os
, indentG
);
3359 } // DHParameterBlock::Print