Skip to content

Commit 5757416

Browse files
tholenstcopybara-github
authored andcommitted
Automated change
PiperOrigin-RevId: 750966692 Change-Id: I04d66891c889f0658a365b0e769ec7615fce2bbf
1 parent 4ccbc2a commit 5757416

File tree

5 files changed

+46
-47
lines changed

5 files changed

+46
-47
lines changed

src/test/java/com/google/crypto/tink/signature/Ed25519PrivateKeyTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@
3232
@RunWith(JUnit4.class)
3333
public final class Ed25519PrivateKeyTest {
3434
// Test case from https://www.rfc-editor.org/rfc/rfc8032#page-24
35-
private static final byte[] SECRET_KEY =
35+
private static final byte[] secretKey =
3636
Hex.decode("9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60");
37-
private static final byte[] PUBLIC_KEY =
37+
private static final byte[] publicKey =
3838
Hex.decode("d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a");
3939

4040
private static final SecretBytes PRIVATE_KEY_BYTES =
41-
SecretBytes.copyFrom(SECRET_KEY, InsecureSecretKeyAccess.get());
42-
private static final Bytes PUBLIC_KEY_BYTES = Bytes.copyFrom(PUBLIC_KEY);
41+
SecretBytes.copyFrom(secretKey, InsecureSecretKeyAccess.get());
42+
private static final Bytes PUBLIC_KEY_BYTES = Bytes.copyFrom(publicKey);
4343

4444
@Test
4545
public void createNoPrefixVariantAndGetProperties() throws Exception {

src/test/java/com/google/crypto/tink/signature/internal/LegacyFullSignTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,51 +90,51 @@ private static com.google.crypto.tink.signature.Ed25519PublicKey publicKeyNoPref
9090
Bytes.copyFrom(getPublicValue().toByteArray()));
9191
}
9292

93-
private static final byte[] FIXED_MESSAGE = Hex.decode("01");
93+
private static final byte[] fixedMessage = Hex.decode("01");
9494

9595
@Test
9696
public void rawKey_verifyWorksCorrectly() throws Exception {
9797
LegacyProtoKey protoKey = getFixedProtoPrivateKey(OutputPrefixType.RAW, null);
9898
PublicKeySign publicKeySign = LegacyFullSign.create(protoKey);
9999
PublicKeyVerify publicKeyVerify = Ed25519Verify.create(publicKeyNoPrefix());
100-
publicKeyVerify.verify(publicKeySign.sign(FIXED_MESSAGE), FIXED_MESSAGE);
100+
publicKeyVerify.verify(publicKeySign.sign(fixedMessage), fixedMessage);
101101
}
102102

103103
@Test
104104
public void tinkKey_verifyWorksCorrectly() throws Exception {
105105
LegacyProtoKey protoKey = getFixedProtoPrivateKey(OutputPrefixType.TINK, 0x22662288);
106106
PublicKeySign publicKeySign = LegacyFullSign.create(protoKey);
107107

108-
byte[] signature = publicKeySign.sign(FIXED_MESSAGE);
108+
byte[] signature = publicKeySign.sign(fixedMessage);
109109
assertThat(Arrays.copyOf(signature, 5)).isEqualTo(Hex.decode("0122662288"));
110110
byte[] signatureNoPrefix = Arrays.copyOfRange(signature, 5, signature.length);
111111
PublicKeyVerify publicKeyVerify = Ed25519Verify.create(publicKeyNoPrefix());
112-
publicKeyVerify.verify(signatureNoPrefix, FIXED_MESSAGE);
112+
publicKeyVerify.verify(signatureNoPrefix, fixedMessage);
113113
}
114114

115115
@Test
116116
public void crunchyKey_verifyWorksCorrectly() throws Exception {
117117
LegacyProtoKey protoKey = getFixedProtoPrivateKey(OutputPrefixType.CRUNCHY, 0x22662288);
118118
PublicKeySign publicKeySign = LegacyFullSign.create(protoKey);
119119

120-
byte[] signature = publicKeySign.sign(FIXED_MESSAGE);
120+
byte[] signature = publicKeySign.sign(fixedMessage);
121121
assertThat(Arrays.copyOf(signature, 5)).isEqualTo(Hex.decode("0022662288"));
122122
byte[] signatureNoPrefix = Arrays.copyOfRange(signature, 5, signature.length);
123123
PublicKeyVerify publicKeyVerify = Ed25519Verify.create(publicKeyNoPrefix());
124-
publicKeyVerify.verify(signatureNoPrefix, FIXED_MESSAGE);
124+
publicKeyVerify.verify(signatureNoPrefix, fixedMessage);
125125
}
126126

127127
@Test
128128
public void legacyKey_verifyWorksCorrectly() throws Exception {
129129
LegacyProtoKey protoKey = getFixedProtoPrivateKey(OutputPrefixType.LEGACY, 0x22662288);
130130
PublicKeySign publicKeySign = LegacyFullSign.create(protoKey);
131131

132-
byte[] signature = publicKeySign.sign(FIXED_MESSAGE);
132+
byte[] signature = publicKeySign.sign(fixedMessage);
133133
assertThat(Arrays.copyOf(signature, 5)).isEqualTo(Hex.decode("0022662288"));
134134
byte[] signatureNoPrefix = Arrays.copyOfRange(signature, 5, signature.length);
135135
PublicKeyVerify publicKeyVerify = Ed25519Verify.create(publicKeyNoPrefix());
136136
publicKeyVerify.verify(
137137
signatureNoPrefix,
138-
com.google.crypto.tink.subtle.Bytes.concat(FIXED_MESSAGE, Hex.decode("00")));
138+
com.google.crypto.tink.subtle.Bytes.concat(fixedMessage, Hex.decode("00")));
139139
}
140140
}

src/test/java/com/google/crypto/tink/signature/internal/LegacyFullVerifyTest.java

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,21 @@ private static LegacyProtoKey getFixedProtoPublicKey(
7070

7171
// Testvector for HPKE taken from
7272
// src/main/java/com/google/crypto/tink/signature/internal/testing/Ed25519TestUtil.java
73-
// FIXED_SIGNATURE is a valid signature for FIXED_MESSAGE under the key given by
73+
// fixedSignature is a valid signature for fixedMessage under the key given by
7474
// getPrivateValue (corresponding to getPublicValue) when used with
7575
// DHKEM_P256_HKDF_SHA256, HKDF_SHA256, AES_128_GCM.
76-
private static final byte[] FIXED_SIGNATURE =
76+
private static final byte[] fixedSignature =
7777
Hex.decode(
7878
"3431985050f48157551262d591d0f1f25b9c6808fce4345066cb8216d48fcd9feafa4b24949a7f8c"
7979
+ "abdc16a51030a19d7514c9685c221475bf3cfc363472ee0a");
80-
private static final byte[] FIXED_MESSAGE = Hex.decode("aa");
80+
private static final byte[] fixedMessage = Hex.decode("aa");
8181

8282
@Test
8383
public void testVectorKey_raw_verifyWorks() throws Exception {
8484
LegacyProtoKey protoKey = getFixedProtoPublicKey(OutputPrefixType.RAW, null);
8585
PublicKeyVerify publicKeyVerify = LegacyFullVerify.create(protoKey);
8686

87-
publicKeyVerify.verify(FIXED_SIGNATURE, FIXED_MESSAGE);
87+
publicKeyVerify.verify(fixedSignature, fixedMessage);
8888
}
8989

9090
@Test
@@ -94,16 +94,15 @@ public void testVectorKey_raw_wrongSignature_throws() throws Exception {
9494

9595
assertThrows(
9696
GeneralSecurityException.class,
97-
() ->
98-
publicKeyVerify.verify(Bytes.concat(FIXED_SIGNATURE, Hex.decode("00")), FIXED_MESSAGE));
97+
() -> publicKeyVerify.verify(Bytes.concat(fixedSignature, Hex.decode("00")), fixedMessage));
9998
}
10099

101100
@Test
102101
public void testVectorKey_tink_verifyWorks() throws Exception {
103102
LegacyProtoKey protoKey = getFixedProtoPublicKey(OutputPrefixType.TINK, 0x55885577);
104103
PublicKeyVerify publicKeyVerify = LegacyFullVerify.create(protoKey);
105104

106-
publicKeyVerify.verify(Bytes.concat(Hex.decode("0155885577"), FIXED_SIGNATURE), FIXED_MESSAGE);
105+
publicKeyVerify.verify(Bytes.concat(Hex.decode("0155885577"), fixedSignature), fixedMessage);
107106
}
108107

109108
@Test
@@ -115,15 +114,15 @@ public void testVectorKey_tink_wrongOutputPrefix_throws() throws Exception {
115114
GeneralSecurityException.class,
116115
() ->
117116
publicKeyVerify.verify(
118-
Bytes.concat(Hex.decode("0055885577"), FIXED_SIGNATURE), FIXED_MESSAGE));
117+
Bytes.concat(Hex.decode("0055885577"), fixedSignature), fixedMessage));
119118
}
120119

121120
@Test
122121
public void testVectorKey_crunchy_verifyWorks() throws Exception {
123122
LegacyProtoKey protoKey = getFixedProtoPublicKey(OutputPrefixType.CRUNCHY, 0x55885577);
124123
PublicKeyVerify publicKeyVerify = LegacyFullVerify.create(protoKey);
125124

126-
publicKeyVerify.verify(Bytes.concat(Hex.decode("0055885577"), FIXED_SIGNATURE), FIXED_MESSAGE);
125+
publicKeyVerify.verify(Bytes.concat(Hex.decode("0055885577"), fixedSignature), fixedMessage);
127126
}
128127

129128
@Test
@@ -135,7 +134,7 @@ public void testVectorKey_crunchy_wrongOutputPrefix_fails() throws Exception {
135134
GeneralSecurityException.class,
136135
() ->
137136
publicKeyVerify.verify(
138-
Bytes.concat(Hex.decode("0055885577"), FIXED_SIGNATURE), FIXED_MESSAGE));
137+
Bytes.concat(Hex.decode("0055885577"), fixedSignature), fixedMessage));
139138
}
140139

141140
@Test
@@ -148,7 +147,7 @@ public void testVectorKey_legacy_verifyWorks() throws Exception {
148147
"0055885577"
149148
+ "e828586415b1226c118617a2b56b923b6717e83c4d265fcb4e2cdf3cb902ce7b9b1ecd840"
150149
+ "5cb4e6a8e248ef5478891b5b6f80f737df16594f88662595d8f140e"),
151-
FIXED_MESSAGE);
150+
fixedMessage);
152151
}
153152

154153
@Test
@@ -164,6 +163,6 @@ public void testVector_legacy_wrongOutputPrefix_fails() throws Exception {
164163
"0055885577"
165164
+ "e828586415b1226c118617a2b56b923b6717e83c4d265fcb4e2cdf3cb902ce7b9b1ecd8"
166165
+ "405cb4e6a8e248ef5478891b5b6f80f737df16594f88662595d8f140e"),
167-
FIXED_MESSAGE));
166+
fixedMessage));
168167
}
169168
}

src/test/java/com/google/crypto/tink/subtle/PrfHmacJceTest.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public MacTestVector(String algName, String key, String message, String tag) {
6666

6767
// Test data from http://csrc.nist.gov/groups/STM/cavp/message-authentication.html#testing
6868
// and https://tools.ietf.org/html/rfc4231.
69-
private static final MacTestVector[] HMAC_TEST_VECTORS = {
69+
private static final MacTestVector[] hmacTestVectors = {
7070
new MacTestVector(
7171
"HMACSHA1",
7272
"816aa4c3ee066310ac1e6666cf830c375355c3c8ba18cfe1f50a48c988b46272",
@@ -115,7 +115,7 @@ public void useConscrypt() throws Exception {
115115
public void testMacTestVectors() throws Exception {
116116
Assume.assumeTrue(!TinkFips.useOnlyFips() || TinkFipsUtil.fipsModuleAvailable());
117117

118-
for (MacTestVector t : HMAC_TEST_VECTORS) {
118+
for (MacTestVector t : hmacTestVectors) {
119119
Mac mac =
120120
new PrfMac(new PrfHmacJce(t.algName, new SecretKeySpec(t.key, "HMAC")), t.tag.length);
121121
assertArrayEquals(t.tag, mac.computeMac(t.message));
@@ -131,7 +131,7 @@ public void testMacTestVectors() throws Exception {
131131
public void testPrfUniformity() throws GeneralSecurityException {
132132
Assume.assumeTrue(!TinkFips.useOnlyFips() || TinkFipsUtil.fipsModuleAvailable());
133133

134-
for (MacTestVector t : HMAC_TEST_VECTORS) {
134+
for (MacTestVector t : hmacTestVectors) {
135135
Prf prf = new PrfHmacJce(t.algName, new SecretKeySpec(t.key, "HMAC"));
136136
// We need a string of bytes identical in size to the tag output size for the given algorithm
137137
// so we can test cross correlation. We're not actually validating the output contents of the
@@ -147,7 +147,7 @@ public void testPrfUniformity() throws GeneralSecurityException {
147147
public void testPrfPrefixOfMac() throws Exception {
148148
Assume.assumeTrue(!TinkFips.useOnlyFips() || TinkFipsUtil.fipsModuleAvailable());
149149

150-
for (MacTestVector t : HMAC_TEST_VECTORS) {
150+
for (MacTestVector t : hmacTestVectors) {
151151
Prf prf = new PrfHmacJce(t.algName, new SecretKeySpec(t.key, "HMAC"));
152152
Mac mac = new PrfMac(prf, t.tag.length);
153153
byte[] prBytes = prf.compute(t.message, t.tag.length - 1);
@@ -162,7 +162,7 @@ public void testPrfPrefixOfMac() throws Exception {
162162
public void testTagTruncation() throws Exception {
163163
Assume.assumeTrue(!TinkFips.useOnlyFips() || TinkFipsUtil.fipsModuleAvailable());
164164

165-
for (MacTestVector t : HMAC_TEST_VECTORS) {
165+
for (MacTestVector t : hmacTestVectors) {
166166
Mac mac =
167167
new PrfMac(new PrfHmacJce(t.algName, new SecretKeySpec(t.key, "HMAC")), t.tag.length);
168168
for (int j = 1; j < t.tag.length; j++) {
@@ -171,7 +171,7 @@ public void testTagTruncation() throws Exception {
171171
}
172172
}
173173
// Test with random keys.
174-
for (MacTestVector t : HMAC_TEST_VECTORS) {
174+
for (MacTestVector t : hmacTestVectors) {
175175
Mac mac =
176176
new PrfMac(
177177
new PrfHmacJce(t.algName, new SecretKeySpec(Random.randBytes(t.key.length), "HMAC")),
@@ -187,7 +187,7 @@ public void testTagTruncation() throws Exception {
187187
public void testBitFlipMessage() throws Exception {
188188
Assume.assumeTrue(!TinkFips.useOnlyFips() || TinkFipsUtil.fipsModuleAvailable());
189189

190-
for (MacTestVector t : HMAC_TEST_VECTORS) {
190+
for (MacTestVector t : hmacTestVectors) {
191191
Mac mac =
192192
new PrfMac(new PrfHmacJce(t.algName, new SecretKeySpec(t.key, "HMAC")), t.tag.length);
193193
for (int b = 0; b < t.message.length; b++) {
@@ -199,7 +199,7 @@ public void testBitFlipMessage() throws Exception {
199199
}
200200
}
201201
// Test with random keys.
202-
for (MacTestVector t : HMAC_TEST_VECTORS) {
202+
for (MacTestVector t : hmacTestVectors) {
203203
Mac mac =
204204
new PrfMac(
205205
new PrfHmacJce(t.algName, new SecretKeySpec(Random.randBytes(t.key.length), "HMAC")),
@@ -215,7 +215,7 @@ public void testBitFlipMessage() throws Exception {
215215
public void testBitFlipTag() throws Exception {
216216
Assume.assumeTrue(!TinkFips.useOnlyFips() || TinkFipsUtil.fipsModuleAvailable());
217217

218-
for (MacTestVector t : HMAC_TEST_VECTORS) {
218+
for (MacTestVector t : hmacTestVectors) {
219219
Mac mac =
220220
new PrfMac(new PrfHmacJce(t.algName, new SecretKeySpec(t.key, "HMAC")), t.tag.length);
221221
for (int b = 0; b < t.tag.length; b++) {
@@ -227,7 +227,7 @@ public void testBitFlipTag() throws Exception {
227227
}
228228
}
229229
// Test with random keys.
230-
for (MacTestVector t : HMAC_TEST_VECTORS) {
230+
for (MacTestVector t : hmacTestVectors) {
231231
Mac mac =
232232
new PrfMac(
233233
new PrfHmacJce(t.algName, new SecretKeySpec(Random.randBytes(t.key.length), "HMAC")),
@@ -339,7 +339,7 @@ public void testFailIfFipsModuleNotAvailable() throws Exception {
339339
@Test
340340
public void createWithHmacPrfKey_equivalentToByteArray() throws Exception {
341341
Assume.assumeFalse(TinkFips.useOnlyFips());
342-
for (MacTestVector t : HMAC_TEST_VECTORS) {
342+
for (MacTestVector t : hmacTestVectors) {
343343
HmacPrfParameters.HashType hashType;
344344
switch (t.algName) {
345345
case "HMACSHA1":

src/test/java/com/google/crypto/tink/subtle/SelfKeyTestValidatorsTest.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class SelfKeyTestValidatorsTest {
4444
// These are keys only used for testing, generated with openssl CLI.
4545
// openssl genrsa -out private-key4096.pem 4096
4646
// openssl rsa -in private-key4096.pem -text -noout
47-
private static final String[] RSAKEY_2048 = {
47+
private static final String[] rsakey2048 = {
4848
// N
4949
"00a5af78921b98763aa4578fd75b7aeb13f7bd7694e5fcf0e25d0c01424374d5cf1c2429c2d94ec1aea4782c0b34dfc63165daabd2573aa90ef6ef5176c985af467d06e68bfb24632f353e650895205777c368fe01593a705d0d300c90b7b7fe09c5012eb07cec76726567f5dfa3c0e73e7d50524e15cc7fac9c47c5d94729b56f0a604485a426716d9e29f43d1c08e4967878ae230f074a97a4e8d17d37dfc6ced5c59485a0640b3b1b6c77816c9123490e49813f43847588689d4c4989d653a92069a8bac5c4fa13abc95b3a27bb0a1a5097e97fd4dd3575656a057715c2a7f3a70058f8f6e7f1ca957cf45f1b748a0f8c2ccd2a51cda862ee25e9346daedd67",
5050
// D
@@ -61,7 +61,7 @@ public class SelfKeyTestValidatorsTest {
6161
"008ca975a95b86bb7e98e58dccb8b7f26d80cd47e389e898f0dc7281f97283981ad748be97ba335ea867ea126197f9f4df1ea33bc383375ce13b08d346ba54f11ccaa71f3314451db255275f090a88a266007b1ea27b762d2ba37e454e7c4f13d798af6f537348b583b13ddfbfd90997d118df8d5d9c369ec28230c415a71c1bf3",
6262
};
6363

64-
private static final String[] RSAKEY_3072 = {
64+
private static final String[] rsakey3072 = {
6565
// N
6666
"00d3764ebdb48112dfefee52feaad8c89f6b8be358780f77808838ed8565099c0c3c0217543ca8cacd4d9de52c6c1264f3ca3c648671e8b336e9560ea28f7830b775402d8224f3c8b5645958d389dcef47f35c20a65c0a2ece6b68bdcbfabb30a92ba2b59b5022ba50accc16113d6d30053bb079685169c454a93f492d6f17d4c7e770b20e7175577284f3505789d127013ada0c44aac2167c47d8a4de377ab9408cf7d5319218ed666b317d459c829133e70906d05bb3138bc593ce7b025705aae3244bb634eaa70047204ed8b13c9ce9fbc4fa0277afe5831897cc838c7fe92a8eaadc1961a70c95254b363efea78dfcdba9683b4105c2e19384fdec569d6c04c89e7f3eac198c05c906e523e5a63e047f45295f3fa7ec3801b7f1d52064218551052753973f184ff85a5e8938ac621adfcbcffe8f3cb936263b026a2e09fcd88510dc37f31d3acf49046d3ea44c453414c70c0cae341411825fc38edfe4d6743dfaafa0b1b4a2f37775c7c75c40f76f1bf01e9be123820da1e34c59e4700fdf",
6767
// D
@@ -78,7 +78,7 @@ public class SelfKeyTestValidatorsTest {
7878
"00abe67e2e70a261aa1f489bcb6237f06f7d9c650f40bdc60570ec624d1914300339c2fe4dbc14b03e839007e09fc52c060bf94179e87e505b993ceff03e67c542769e035a8f7607ad88b65214fd4c702c7a4e469be64b5562e5ce8ffda2ce2b720ade8b9ea6c750678239f3c136fee1970d3c88db26cdec535b6376237f09ce1ab655822f6f78ce98b869116711a002fbb6046c2ec192224600d06b6eb46a5912353f61860d1ed5cd2d01b4fc7d17a4a7771137b427868100ef2b417fc003341b",
7979
};
8080

81-
private static final String[] RSAKEY_4096 = {
81+
private static final String[] rsakey4096 = {
8282
// N
8383
"00b81c5e5753c233a3cdf8a1d928122b2f2c489af9e05167f481b1dd420ddf4eb57dc2da0541ff2403ec5302c4c44edaac046de4b94658146f4705ca60ce8de9f58eb4b0c660062c16c0600a3e5988c09d0aaf4607a62cae34ffd88db9bb1d1110c01a0117db0b233eeaa66621638fcfff548a778fec609b5adfa336f51eb1c63128affee1cfd4657bb6aac4fe3b08f642e2dc49cf4138f6335a230994ab12522c6d4e909f0f44cd430f0cc95b8d05dc89ded0a0dd1ba83206ed37d1223efaddc4b7ae373f05af1e00d2edde29e30f5152e270d2f50eb305b90d4c8825d6901fdbaf7df561a017a9a49221cba49a51efb88ebfe2639183eeae81f40a008cb9eb9045fb402863a82f7d41a691098d4d9cb8dcd44001b1956727f5f515cd1fb718d3c70fa70ebd5a92a6e2f1fd53d0abfa2c840fdf2f34a43ba6f7ab58d8e055e5684a631c08773d5b85469ca3d7d3137f358ff483e1d99c97d62d7a620488cd2bd963a3e97c5385123ed41f781c57a8456f32c80f096dcf8b823a18a289853d2b19411dded7d91c59380b883907c63e8f3fc75c2836ed6c4dfe04a8f919342b63278c8b5285e4706fda095f5a3286aa70e5cdd074f99358c98f53a9921270b44114824b9d89de39a0cffb6d496589798b55a629350422a84f2acf59a94e02d280beb75d439da4264791c7ef5efcd7bb5c4a8f129fce3c61a47e8601af9799490dc5",
8484
// D
@@ -102,7 +102,7 @@ public class SelfKeyTestValidatorsTest {
102102
// 03 means there is a compression and select y as positive
103103
// 02 means there is a compression and select y as negative
104104

105-
private static final byte[][] ECDSAKEY_256 = {
105+
private static final byte[][] ecdsakey256 = {
106106
// pubX
107107
{
108108
(byte) 0x52, (byte) 0x46, (byte) 0x92, (byte) 0x45, (byte) 0x30, (byte) 0x2b, (byte) 0x25,
@@ -134,7 +134,7 @@ public class SelfKeyTestValidatorsTest {
134134
(byte) 0x24, (byte) 0x71
135135
}
136136
};
137-
private static final byte[][] ECDSAKEY_384 = {
137+
private static final byte[][] ecdsakey384 = {
138138
// pubX
139139
{
140140
(byte) 0x70,
@@ -289,7 +289,7 @@ public class SelfKeyTestValidatorsTest {
289289
(byte) 0x58
290290
}
291291
};
292-
private static final byte[][] ECDSAKEY_521 = {
292+
private static final byte[][] ecdsakey521 = {
293293
// pubX
294294
{
295295
(byte) 0x01,
@@ -587,12 +587,12 @@ public static Object[] parametersPkcs1Invalid() {
587587
public static final String[] getRsaKeyInfo(int keySize) throws Exception {
588588
switch (keySize) {
589589
case 2048:
590-
return RSAKEY_2048;
590+
return rsakey2048;
591591
case 3072:
592-
return RSAKEY_3072;
592+
return rsakey3072;
593593
case 4096:
594594
default:
595-
return RSAKEY_4096;
595+
return rsakey4096;
596596
}
597597
}
598598

@@ -682,11 +682,11 @@ public static final byte[][] getEcdsaKeyInfo(EllipticCurves.CurveType curveType)
682682
throws Exception {
683683
switch (curveType) {
684684
case NIST_P256:
685-
return ECDSAKEY_256;
685+
return ecdsakey256;
686686
case NIST_P384:
687-
return ECDSAKEY_384;
687+
return ecdsakey384;
688688
case NIST_P521:
689-
return ECDSAKEY_521;
689+
return ecdsakey521;
690690
}
691691

692692
throw new Exception("invalid curve. Should never happen.");

0 commit comments

Comments
 (0)