Skip to content

decodeDerStringOrThrow ​

decodeDerStringOrThrow ​

Decodes a string element into text, dispatching on its tag.

Supports UTF8String, PrintableString, TeletexString, IA5String, UniversalString, and BMPString. A TeletexString decodes only in its X.690 §8.23.5.2 initial state.

ts
function decodeDerStringOrThrow(
	element: DerElement,
): string

Parameters

Throws

  • on every other string tag, and on a TeletexString octet outside that state.

Released under the MIT License.