On Thu, 1 May 2025 11:55:20 GMT, Weijun Wang <wei...@openjdk.org> wrote:

>> src/java.base/share/classes/sun/security/util/KeyUtil.java line 506:
>> 
>>> 504:                 if (seed == null) return null;
>>> 505:                 skOctets = new byte[seed.length + 2];
>>> 506:                 skOctets[0] = (byte)0x80;
>> 
>> Is there any value in using the DerValue class to put a name on these 
>> constants? I think what you have is easy enough to read.
>
> You mean I can use `DerValue.TAG_CONTEXT + 0` instead of 0x80? I can, but yes 
> it's no more readable than the number itself. It's probably all about 
> consistency. If I use `TAG_CONTEXT` here, I might also need to use 
> `tag_OctetString`, `tag_Sequence`.

I agree. Leave it the way you have it.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/24969#discussion_r2070260625

Reply via email to