@@ -386,30 +386,30 @@ public class CipherStrings {
386
386
387
387
static final class Def implements Comparable <Def >, Cloneable {
388
388
389
- final int valid ;
389
+ //private final byte valid;
390
390
final String name ;
391
- final long id ;
391
+ //private final long id;
392
392
final long algorithms ;
393
- final long algo_strength ;
394
- final long algorithm2 ;
395
- final int strength_bits ;
396
- final int alg_bits ;
397
- final long mask ;
398
- final long mask_strength ;
393
+ private final long algStrength ;
394
+ // final long algorithm2;
395
+ final int algStrengthBits ;
396
+ final int algBits ;
397
+ private final long mask ;
398
+ private final long algStrengthMask ;
399
399
400
400
private volatile String cipherSuite ;
401
401
402
- Def (int valid , String name , long id , long algorithms , long algo_strength , long algorithm2 , int strength_bits , int alg_bits , long mask , long mask_strength ) {
403
- this .valid = valid ;
402
+ Def (int valid , String name , long id , long algorithms , long algo_strength , long algorithm2 , int strength_bits , int alg_bits , long mask , long maskStrength ) {
403
+ // this.valid = (byte) valid;
404
404
this .name = name ;
405
- this .id = id ;
405
+ // this.id = id;
406
406
this .algorithms = algorithms ;
407
- this .algo_strength = algo_strength ;
408
- this .algorithm2 = algorithm2 ;
409
- this .strength_bits = strength_bits ;
410
- this .alg_bits = alg_bits ;
407
+ this .algStrength = algo_strength ;
408
+ // this.algorithm2 = algorithm2;
409
+ this .algStrengthBits = strength_bits ;
410
+ this .algBits = alg_bits ;
411
411
this .mask = mask ;
412
- this .mask_strength = mask_strength ;
412
+ this .algStrengthMask = maskStrength ;
413
413
}
414
414
415
415
public String getCipherSuite () {
@@ -451,12 +451,14 @@ public boolean equals(Object other) {
451
451
452
452
@ Override
453
453
public int compareTo (final Def that ) {
454
- return this .strength_bits - that .strength_bits ;
454
+ return this .algStrengthBits - that .algStrengthBits ;
455
455
}
456
456
457
457
@ Override
458
458
public String toString () {
459
- return "Cipher<" + name + ">" ;
459
+ return getClass ().getSimpleName () + '@' +
460
+ Integer .toHexString (System .identityHashCode (this )) +
461
+ '<' + name + '>' ;
460
462
}
461
463
462
464
// from ssl_cipher_apply_rule
@@ -472,11 +474,11 @@ public boolean matches(Def current) {
472
474
// ((ma_s & algo_strength) != ma_s))
473
475
// continue; // does not apply
474
476
// }
475
- long ma = mask & current .algorithms ;
476
- long ma_s = mask_strength & current .algo_strength ;
477
- if ((( ma == 0 ) && ( ma_s == 0 ) ) ||
478
- (( ma & algorithms ) != ma ) ||
479
- (( ma_s & algo_strength ) != ma_s )) {
477
+ final long ma = this . mask & current .algorithms ;
478
+ final long ma_s = this . algStrengthMask & current .algStrength ;
479
+ if ( ( ma == 0 && ma_s == 0 ) ||
480
+ ( ( ma & this . algorithms ) != ma ) ||
481
+ ( ( ma_s & this . algStrength ) != ma_s ) ) {
480
482
return false ;
481
483
}
482
484
return true ;
0 commit comments