encodeOidFromString

fnubyte[] encodeOidFromString(string dotted) pure @safe

Encodes an OID from its dotted-decimal string representation to binary.

The first two components are packed into a single byte as 40 * first + second. Subsequent components use base-128 encoding (high bit set on every byte except the last).

Parameters

dottedThe dotted OID string (e.g. "1.2.840.113549.1.1.1").

Returns

The binary-encoded OID bytes (without tag or length).

Throws

CryptoException if the string is malformed or has fewer than

two components.