public static byte[] toRawSignatureBytes(BigInteger[] rs) throws IOException {
  ByteArrayOutputStream bos=new ByteArrayOutputStream(64);
  byte[] r=toUnsignedByteArray(rs[0]);
  byte[] s=toUnsignedByteArray(rs[1]);
  bos.write(r);
  bos.write(s);
  return bos.toByteArray();
}

public static byte [ ] toRawSignatureBytes ( BigInteger [ ] rs ) throws IOException { ByteArrayOutputStream bos = new ByteArrayOutputStream ( 64 ) ; byte [ ] r = toUnsignedByteArray ( rs [ 0 ] ) ; byte [ ] s = toUnsignedByteArray ( rs [ 1 ] ) ; bos . write ( r ) ; bos . write ( s ) ; return bos . toByteArray ( ) ; }
from big integers r , s to byte [ ] uaf_alg_sign_secp256k1_ecdsa_sha256_raw 0x05 an ecdsa signature on the secp256k1 curve which must have raw r and s buffers , encoded in big - endian order . i . e . [ r ( 32 bytes ) , s ( 32 bytes ) ]
