code: public static String getSHA256String(String str) {
          MessageDigest messageDigest = getMessageDigest(SHA256);
          return getHashString(str, messageDigest);
      }
docs: Calculate SHA-256 hash of a String
  
  @param str - the String to hash
  @return the SHA-256 hash value