[9] RFR: 8048596: Tests for AEAD ciphers
Valerie Peng
valerie.peng at oracle.com
Wed Jul 22 20:36:36 UTC 2015
Yeah, many ways to generate bytes. It's generally ok to just re-use the
same input for various test scenarios in the same test class.
As far as I am concerned, the benefit of get data in one line doesn't
quite justify the extra dependency.
The updated webrev looks fine.
Valerie
On 7/20/2015 11:33 PM, Artem Smotrakov wrote:
> Hi Valerie,
>
> The tests can easily get data in one line with RandomFacroty. But they
> can use static data that may be created with something like the
> following:
>
> public class Helper {
>
> public static byte[] generateBytes(int length) {
> byte[] bytes = new byte[length];
> for (int i=0; i<length; i++) {
> bytes[i] = (byte) (i % 256);
> }
> return bytes;
> }
> }
>
> Please take a look an updated webrev:
>
> http://cr.openjdk.java.net/~asmotrak/8048596/webrev.02/
>
> Artem
>
> On 07/21/2015 12:19 AM, Valerie Peng wrote:
>> Hi Artem,
>>
>> Just some nit (see below). In general, I find the tests don't need to
>> use so many random bytes. If we don't need RandomFactory, then no
>> dependence on jdk.testlibrary. Make things easier to execute the test
>> on its own if necessary. Just something to keep in mind for future
>> test development.
>>
>> <Encrypt.java>
>> - line 186: typo in "intiate". I think you mean initiate the cipher
>> without parameters? I don't see how the parameters are saved here.
>> - line 190: I think either "generated" or "specified" is better than
>> "saved".
>>
>> <GCMParameterSpecTest.java>
>> - line 117: template not reporting key length?
>> - line 219: getInstance with "SunJCE"?
>>
>> <SameBuffer.java>
>> - line 110: this check can be done earlier, e.g. on line 108.
>>
>> Thanks,
>> Valerie
>>
>> On 7/10/2015 1:02 PM, Artem Smotrakov wrote:
>>> Hello,
>>>
>>> Please review a couple of new tests for AEAD ciphers.
>>>
>>> Webrev: http://cr.openjdk.java.net/~asmotrak/8048596/webrev.01/
>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8048596
>>>
>>> Artem
>
More information about the security-dev
mailing list