On Mon, 16 Nov 2020 16:30:04 GMT, Sean Mullan <mul...@openjdk.org> wrote:
>> minor comment on spacing for MGF1 toString() > >> Do you want me to consolidate `PSSParameterSpec::toString` into one line? >> Multi-line toString is usually not very friendly to debug output (esp for >> grep). > > Good question. Readability is important though. I think it depends on the > number of fields and we should try to use a consistent format if possible. > Something like X509Certificate.toString would be very unfriendly if it > returned a one-line String, or if the toString impls of different fields used > different formatting. New commit and the output will look like: PSSParameterSpec[hashAlgorithm=SHA-256, maskGenAlgorithm=MGF1ParameterSpec[hashAlgorithm=SHA-256], saltLength=32, trailerField=1] I'm using the ASN.1 field names here. (Precisely the name in MGF1 is OAEP-PSSDigestAlgorithms but that's too long). ------------- PR: https://git.openjdk.java.net/jdk/pull/1208