A convenient method for validating the tag of an ASN.1 element.
When writing an application that uses ASN.1 validation often has to be
performed for the tagClass, construction, and tagNumber.
This results in a lot of code that looks like this:
if (!canFind(acceptableTagClasses, this.tagClass))
thrownewASN1TagClassException
(acceptableTagClasses, this.tagClass, whatYouAttemptedToDo);
if (this.construction != acceptableConstruction)
thrownewASN1ConstructionException
(this.construction, whatYouAttemptedToDo);
if (!canFind(acceptableTagNumbers, this.tagNumber))
thrownewASN1TagNumberException
(acceptableTagNumbers, this.tagNumber, whatYouAttemptedToDo);
This function was created to combat excessive code resulting from this recurring need.
A convenient method for validating the tag of an ASN.1 element.
When writing an application that uses ASN.1 validation often has to be performed for the tagClass, construction, and tagNumber. This results in a lot of code that looks like this:
This function was created to combat excessive code resulting from this recurring need.