code: function _rsapem_encodeLength(length) {
      if (length >= parseInt("80", 16)) {
          var realLength = _rsapem_padWithZero(length.toString(16));
          var lengthOfLength = (realLength.length / 2);
          return (parseInt("80", 16) + lengthOfLength).toString(16) + realLength;
      } else {
          return _rsapem_padWithZero(length.toString(16));
      }
  }
docs: Encode length in DER format (if length <0x80, then one byte, else first byte is 0x80 + length of length :) + n-bytes of length).