@@ -386,30 +386,30 @@ public class CipherStrings {
386386
387387 static final class Def implements Comparable <Def >, Cloneable {
388388
389- final int valid ;
389+ //private final byte valid;
390390 final String name ;
391- final long id ;
391+ //private final long id;
392392 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 ;
399399
400400 private volatile String cipherSuite ;
401401
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;
404404 this .name = name ;
405- this .id = id ;
405+ // this.id = id;
406406 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 ;
411411 this .mask = mask ;
412- this .mask_strength = mask_strength ;
412+ this .algStrengthMask = maskStrength ;
413413 }
414414
415415 public String getCipherSuite () {
@@ -451,12 +451,14 @@ public boolean equals(Object other) {
451451
452452 @ Override
453453 public int compareTo (final Def that ) {
454- return this .strength_bits - that .strength_bits ;
454+ return this .algStrengthBits - that .algStrengthBits ;
455455 }
456456
457457 @ Override
458458 public String toString () {
459- return "Cipher<" + name + ">" ;
459+ return getClass ().getSimpleName () + '@' +
460+ Integer .toHexString (System .identityHashCode (this )) +
461+ '<' + name + '>' ;
460462 }
461463
462464 // from ssl_cipher_apply_rule
@@ -472,11 +474,11 @@ public boolean matches(Def current) {
472474// ((ma_s & algo_strength) != ma_s))
473475// continue; // does not apply
474476// }
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 ) ) {
480482 return false ;
481483 }
482484 return true ;
0 commit comments