encodeUnsignedInteger

fnubyte[] encodeUnsignedInteger(const(ubyte)[] bigEndianValue) pure @safe

Encodes a non-negative integer as DER INTEGER content bytes.

The result is a minimal big-endian representation, with a leading 0x00 padding byte inserted if the high bit of the first byte is set (to keep the value positive).

Parameters

bigEndianValueThe unsigned integer in big-endian byte order.

Returns

The DER INTEGER content bytes.