Re: RFR: 8294987: Streamline DerOutputStream write [v2]

2022-10-07 Thread Anthony Scarpino
On Fri, 7 Oct 2022 19:52:15 GMT, Weijun Wang wrote: >> Return `this` in various output methods so you can write something like >> >> new DerOutputStream().putInteger(1) >> .putOctetString("12345".getBytes(StandardCharsets.UTF_8)) >> .write(AlgorithmId.get(

Re: RFR: 8294987: Streamline DerOutputStream write [v2]

2022-10-07 Thread Weijun Wang
> Return `this` in various output methods so you can write something like > > new DerOutputStream().putInteger(1) > .putOctetString("12345".getBytes(StandardCharsets.UTF_8)) > .write(AlgorithmId.get("ed25519")) > .writeImplicit((byte)0x80, ne

Re: RFR: 8294987: Streamline DerOutputStream write

2022-10-07 Thread Weijun Wang
On Fri, 7 Oct 2022 18:39:48 GMT, Anthony Scarpino wrote: > There are a number of methods that call 'write()' then call 'return this;' > they could just be 'return write()', but if that's a style you prefer, that > is fine. Not my style. Will fix them. - PR: https://git.openjdk.or

Re: RFR: 8294987: Streamline DerOutputStream write

2022-10-07 Thread Anthony Scarpino
On Fri, 7 Oct 2022 15:47:49 GMT, Weijun Wang wrote: > Return `this` in various output methods so you can write something like > > new DerOutputStream().putInteger(1) > .putOctetString("12345".getBytes(StandardCharsets.UTF_8)) > .write(AlgorithmId.get("ed25

Re: RFR: 8294987: Streamline DerOutputStream write

2022-10-07 Thread Jamil Nimeh
On Fri, 7 Oct 2022 15:47:49 GMT, Weijun Wang wrote: > Return `this` in various output methods so you can write something like > > new DerOutputStream().putInteger(1) > .putOctetString("12345".getBytes(StandardCharsets.UTF_8)) > .write(AlgorithmId.get("ed25

RFR: 8294987: Streamline DerOutputStream write

2022-10-07 Thread Weijun Wang
Return `this` in various output methods so you can write something like new DerOutputStream().putInteger(1) .putOctetString("12345".getBytes(StandardCharsets.UTF_8)) .write(AlgorithmId.get("ed25519")) .writeImplicit((byte)0x80, new DerOutput