@Override
  public boolean equals(Object obj) {
    if (obj == null || !(obj instanceof AuthenticationKey)) {
      return false;
    }
    AuthenticationKey other = (AuthenticationKey) obj;
    return id == other.getKeyId() && expirationDate == other.getExpiration()
      && (secret == null
        ? other.getKey() == null
        : other.getKey() != null && Bytes.equals(secret.getEncoded(), other.getKey().getEncoded()));
  }
Represents a secret key used for signing and verifying authentication tokens by
{@link AuthenticationTokenSecretManager}.
hbase-server/src/main/java/org/apache/hadoop/hbase/security/token/AuthenticationKey.java