public static String encodeIdentifier(byte[] identifier) {
    return Base64.getEncoder().encodeToString(identifier);
  }
Splitting fully qualified Kerberos name into parts
hbase-client/src/main/java/org/apache/hadoop/hbase/security/SaslUtil.java