equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
51 int encodeLength; |
51 int encodeLength; |
52 int decodeLength; |
52 int decodeLength; |
53 int decodeMsgSize; |
53 int decodeMsgSize; |
54 String algorithm = System.getProperty("algorithm", "AES"); |
54 String algorithm = System.getProperty("algorithm", "AES"); |
55 String mode = System.getProperty("mode", "CBC"); |
55 String mode = System.getProperty("mode", "CBC"); |
56 String paddingStr = System.getProperty("paddingStr", "PKCS5Padding"); |
56 String paddingStr = System.getProperty("paddingStr", |
|
57 (mode.equals("GCM") || mode.equals("CTR") || mode.equals("CTS")) ? |
|
58 "NoPadding" : "PKCS5Padding"); |
57 byte[] input; |
59 byte[] input; |
58 byte[] encode; |
60 byte[] encode; |
59 byte[] expectedEncode; |
61 byte[] expectedEncode; |
60 byte[] decode; |
62 byte[] decode; |
61 byte[] expectedDecode; |
63 byte[] expectedDecode; |