lib/signature.js
function( digest ) {

    var signature = ECDSASignature.decode( digest, 'der' )
    var length = ( this.bits / 8 | 0 ) + ( this.bits % 8 !== 0 ? 1 : 0 )

    var r = Buffer.from( signature.r.toString( 'hex', length ), 'hex' )
    var s = Buffer.from( signature.s.toString( 'hex', length ), 'hex' )

    return Buffer.concat([ r, s ], r.length + s.length )

  }
function( digest ) {

    var signature = ECDSASignature.decode( digest, 'der' )
    var length = ( this.bits / 8 | 0 ) + ( this.bits % 8 !== 0 ? 1 : 0 )

    var r = Buffer.from( signature.r.toString( 'hex', length ), 'hex' )
    var s = Buffer.from( signature.s.toString( 'hex', length ), 'hex' )

    return Buffer.concat([ r, s ], r.length + s.length )

  }
function ( digest ) { var signature = ECDSASignature . decode ( digest , 'der' ) var length = ( this . bits / 8 | 0 ) + ( this . bits % 8 !== 0 ? 1 : 0 ) var r = Buffer . from ( signature . r . toString ( 'hex' , length ) , 'hex' ) var s = Buffer . from ( signature . s . toString ( 'hex' , length ) , 'hex' ) return Buffer . concat ( [ r , s ] , r . length + s . length ) }
Create a ECDSA signature for a given digest
@internal used by `.sign()`
@param  {Buffer} digest
@return {Buffer}
Create a ECDSA signature for a given digest