@Override
  protected synchronized byte[] createPassword(AuthenticationTokenIdentifier identifier) {
    long now = EnvironmentEdgeManager.currentTime();
    AuthenticationKey secretKey = currentKey;
    identifier.setKeyId(secretKey.getKeyId());
    identifier.setIssueDate(now);
    identifier.setExpirationDate(now + tokenMaxLifetime);
    identifier.setSequenceNumber(tokenSeq.getAndIncrement());
    return createPassword(identifier.getBytes(), secretKey.getKey());
  }
Create a new secret manager instance for generating keys.
@param conf              Configuration to use
@param zk                Connection to zookeeper for handling leader elections
@param keyUpdateInterval Time (in milliseconds) between rolling a new master key for token
                         signing
@param tokenMaxLifetime  Maximum age (in milliseconds) before a token expires and is no longer
                         valid
hbase-server/src/main/java/org/apache/hadoop/hbase/security/token/AuthenticationTokenSecretManager.java