code: async function sign(oid, hash_algo, m, d, hashed) {
    const curve = new Curve(oid);
    const key = curve.keyFromPrivate(d);
    const signature = await key.sign(m, hash_algo, hashed);
    return { r: signature.r.toArrayLike(Uint8Array),
             s: signature.s.toArrayLike(Uint8Array) };
  }
docs: Sign a message using the provided key
  @param  {module:type/oid}   oid       Elliptic curve object identifier
  @param  {module:enums.hash} hash_algo Hash algorithm used to sign
  @param  {Uint8Array}        m         Message to sign
  @param  {Uint8Array}        d         Private key used to sign the message
  @param  {Uint8Array}        hashed    The hashed message
  @returns {{r: Uint8Array,
  s: Uint8Array}}            Signature of the message
  @async