@Override
  public void write(DataOutput out) throws IOException {
    WritableUtils.writeVInt(out, id);
    WritableUtils.writeVLong(out, expirationDate);
    if (secret == null) {
      WritableUtils.writeVInt(out, -1);
    } else {
      byte[] keyBytes = secret.getEncoded();
      WritableUtils.writeVInt(out, keyBytes.length);
      out.write(keyBytes);
    }
  }
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