index.js
/**
   * Creates a length-value DER encoding for the input data as
   * it would have been for a BIT STRING. The DER encoded data
   * will be copied in der.
   *
   * Note that the BIT STRING tag is not included in the output.
   * @param {Buffer} bitstr BIT string.
   * @param {number} der buffer to hold the returned encoded string.
   * @returns {number} number of meaningful bytes of DER
   */
Creates a length-value DER encoding for the input data as
it would have been for a BIT STRING. The DER encoded data
will be copied in der.

Note that the BIT STRING tag is not included in the output.
@param {Buffer} bitstr BIT string.
@param {number} der buffer to hold the returned encoded string.
@returns {number} number of meaningful bytes of DER
Creates a length - value DER encoding for the input data as it would have been for a BIT STRING . The DER encoded data will be copied in der . Note that the BIT STRING tag is not included in the output . @param { Buffer } bitstr BIT string . @param { number } der buffer to hold the returned encoded string . @returns { number } number of meaningful bytes of DER
bit_der(bitstr, der) {
    assertint(der);
    if (!Buffer.isBuffer(bitstr)) {
      throw new TypeError('Expected Buffer');
    }
    const input_ptr = this.salloc(bitstr);
    const input_length = bitstr.length;
    const length = this[_module]._node_asn1_bit_der(
      input_ptr,
      input_length,
      der
    );
    this.free(input_ptr);
    return length;
  }
bit_der ( bitstr , der ) { assertint ( der ) ; if ( ! Buffer . isBuffer ( bitstr ) ) { throw new TypeError ( 'Expected Buffer' ) ; } const input_ptr = this . salloc ( bitstr ) ; const input_length = bitstr . length ; const length = this [ _module ] . _node_asn1_bit_der ( input_ptr , input_length , der ) ; this . free ( input_ptr ) ; return length ; }
Creates a length-value DER encoding for the input data as
 it would have been for a BIT STRING.
Creates a length - value DER encoding for the input data as it would have been for a BIT STRING .