We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f76238e commit 7068561Copy full SHA for 7068561
core/java/src/net/i2p/data/KeysAndCert.java
@@ -258,8 +258,11 @@ public boolean equals(Object object) {
258
return
259
DataHelper.eq(_signingKey, ident._signingKey)
260
&& DataHelper.eq(_publicKey, ident._publicKey)
261
- && Arrays.equals(_padding, ident._padding)
262
- && DataHelper.eq(_certificate, ident._certificate);
+ && DataHelper.eq(_certificate, ident._certificate)
+ && (Arrays.equals(_padding, ident._padding) ||
263
+ // failsafe as some code paths may not compress padding
264
+ ((_paddingBlocks > 1 || ident._paddingBlocks > 1) &&
265
+ Arrays.equals(getPadding(), ident.getPadding())));
266
}
267
268
/** the signing key has enough randomness in it to use it by itself for speed */
0 commit comments