docs: private static char[] toCharArray(String password) {
          char[] result = password.toCharArray();
          if (result.length == 0) {
              result = new char[]{0};
          }
          return result;
      }