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