index.js
/**
   * Creates a length-value DER encoding for the input data.
   * The DER encoding of the input data will be placed in the der variable.
   *
   * Note that the OCTET STRING tag is not included in the output.
   * @param {string} str the input data.
   * @param {number} der buffer to hold the returned encoded string.
   * @param {string} [encoding] valid nodejs string encoding.
   * @returns {number} number of meaningful bytes of DER
   */
Creates a length-value DER encoding for the input data.
The DER encoding of the input data will be placed in the der variable.

Note that the OCTET STRING tag is not included in the output.
@param {string} str the input data.
@param {number} der buffer to hold the returned encoded string.
@param {string} [encoding] valid nodejs string encoding.
@returns {number} number of meaningful bytes of DER
Creates a length - value DER encoding for the input data . The DER encoding of the input data will be placed in the der variable . Note that the OCTET STRING tag is not included in the output . @param { string } str the input data . @param { number } der buffer to hold the returned encoded string . @param { string } [ encoding ] valid nodejs string encoding . @returns { number } number of meaningful bytes of DER
octet_der(str, der, encoding = 'ascii') {
    assertint(der);
    const input_ptr = this.salloc(str, encoding);
    const input_length = Buffer.byteLength(str, encoding);
    const length = this[_module]._node_asn1_octet_der(
      input_ptr,
      input_length,
      der
    );
    this.free(input_ptr);
    return length;
  }
octet_der ( str , der , encoding = 'ascii' ) { assertint ( der ) ; const input_ptr = this . salloc ( str , encoding ) ; const input_length = Buffer . byteLength ( str , encoding ) ; const length = this [ _module ] . _node_asn1_octet_der ( input_ptr , input_length , der ) ; this . free ( input_ptr ) ; return length ; }
Creates a length-value DER encoding for the input data.
Creates a length - value DER encoding for the input data .