On Fri, 29 Apr 2022 15:23:47 GMT, Sean Mullan <mul...@openjdk.org> wrote:

>> Valerie Peng has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Update for getParameters()
>
> src/java.base/share/classes/javax/crypto/Cipher.java line 1053:
> 
>> 1051:      * <p>The returned parameters may be the same that were used to 
>> initialize
>> 1052:      * this cipher, or may contain additional default or random 
>> parameter
>> 1053:      * values used by the underlying cipher implementation. If the 
>> required
> 
> The PR for https://github.com/openjdk/jdk/pull/8396/ has one difference in 
> this sentence in that it says "... values used by the underlying signature 
> implementation _if the underlying signature implementation supports returning 
> the parameters as {@code AlgorithmParameters}_." Should this also be 
> consistent?
> 
> Also, I don't think you need to repeat "underlying signature " again above, 
> you could just say: ... values used by the underlying signature 
> implementation _if the implementation supports returning the parameters as 
> {@code AlgorithmParameters}_."

Signature class has that sentence is due to the peculiar case of EdDSA 
signature impl where its parameter spec does not correlate to an ASN.1 
structure. Since there is no such case for current cipher impls (as far as I 
know), that's why I have not added it to Cipher class. 

Ok, how about `If the required parameters were not supplied and can be 
generated by the cipher, the generated parameters will be returned.`?

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

PR: https://git.openjdk.java.net/jdk/pull/8117

Reply via email to