Skip to main content

FromBerOptions

Encoding, input ownership, and resource limits for ASN.1 decoding.

Properties​

copyInput?​

optional copyInput?: boolean

Copy the input bytes before decoding. Defaults to true for fromBER/fromDER and false for verifySchema in both BER and DER.


encodingRules?​

optional encodingRules?: EncodingRules

Encoding rules to validate.

Default Value​

"BER"

maxContentLength?​

optional maxContentLength?: number

Maximum content length of one element in bytes.

Default Value​

16777216

maxDepth?​

optional maxDepth?: number

Maximum nesting depth, with the root at depth zero.

Default Value​

100

maxNodes?​

optional maxNodes?: number

Maximum number of decoded nodes.

Default Value​

10000

parseEmbedded?​

optional parseEmbedded?: boolean

Try decoding embedded OCTET STRING and BIT STRING content. Defaults to true for BER and false for DER.


requireFullInput?​

optional requireFullInput?: boolean

Require exactly one input element. Always true for DER; explicitly setting false with DER throws TypeError.

Default Value​

false