code: private static char[] createSha512Hash(final char[] password) {
          try {
              final MessageDigest digest = MessageDigest.getInstance("SHA-512");
              digest.update(ByteUtil.toBytes(password));
              final byte[] byteData = digest.digest();
  
              final StringBuilder sb = new StringBuilder();
              for (final byte data : byteData) {
                  sb.append(Integer.toString((data & 0xff) + 0x100, 16).substring(1));
              }
              final char[] hash = new char[128];
              sb.getChars(0, sb.length(), hash, 0);
              return hash;
          } catch (NoSuchAlgorithmException e) {
              throw new UnsupportedOperationException(e);
          }
      }
docs: Creates a SHA-512 hash of the specified password and returns a HEX
  representation of the hash. This method should NOT be used solely
  for password hashing, but in conjunction with password-specific
  hashing functions.
  
  @param password the password to hash
  @return a char[] of the hashed password
  @since 1.0.0