edgeport - v1.0.3
    Preparing search index...

    Function toMpintBody

    • Encodes an unsigned big-endian magnitude as an SSH mpint body (without the length prefix), applying the RFC 4251 rules: strip leading zero bytes to the minimal form, then prepend a single 0x00 if the high bit of the first byte is set (so the value stays positive). Zero encodes as an empty array.

      Parameters

      • magnitude: Uint8Array

        Big-endian unsigned magnitude bytes.

      Returns Uint8Array

      The minimal, sign-corrected mpint body.

      1.0.0