Skip to content

ParsedBitFlags

A decoded BIT STRING flag set.

flags contains the recognized flag values with any non-zero padding bits masked out. nonZeroPadding is true when the original BIT STRING encoding had non-zero bits in positions that DER (X.690 §11.2.2) requires to be zero. Verification layers can use this signal to reject non-conformant encodings.

ts
interface ParsedBitFlags<T extends string> {
	readonly flags: readonly T[];
	readonly nonZeroPadding: boolean;
}

Properties

  • readonly flags: readonly T``[] — Decoded flag values, padding bits masked.
  • readonly nonZeroPadding: booleantrue when the original encoding had non-zero padding bits (DER violation).

Released under the MIT License.