Exemplo n.º 1
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   SecretKeys other = (SecretKeys) obj;
   if (!integrityKey.equals(other.integrityKey)) return false;
   if (!confidentialityKey.equals(other.confidentialityKey)) return false;
   return true;
 }
Exemplo n.º 2
0
 @Override
 public boolean equals(Object o) {
   if (o == null) return false;
   if (o == this) return true;
   if (o instanceof SymmetricSecretKey) {
     SymmetricSecretKey other = ((SymmetricSecretKey) o);
     return secretKey.equals(other.secretKey)
         && type == other.type
         && ((ivParameter == null && other.ivParameter == null)
             || (ivParameter != null
                 && other.ivParameter != null
                 && Arrays.equals(ivParameter.getIV(), other.ivParameter.getIV())));
   }
   return false;
 }