4806752619459fed4c69efb250e2b9dff86cfe4d
diff --git a/docs/reference/glib/glib-sections.txt b/docs/reference/glib/glib-sections.txt
index 1fb2c91..6ca1bbd 100644
--- a/docs/reference/glib/glib-sections.txt
+++ b/docs/reference/glib/glib-sections.txt
@@ -2508,4 +2508,5 @@ g_checksum_update
 g_checksum_get_string
 g_checksum_get_digest
 g_checksum_from_data
+g_checksum_from_string
 </SECTION>
diff --git a/glib/gchecksum.c b/glib/gchecksum.c
index dc7162f..01cac25 100644
--- a/glib/gchecksum.c
+++ b/glib/gchecksum.c
@@ -1347,7 +1347,7 @@ g_checksum_get_digest (GChecksum  *checksum,
 
 /**
  * g_checksum_from_data:
- * @type: a #GChecksumType
+ * @checksum_type: a #GChecksumType
  * @data: a binary blob
  * @length: length of the data
  *
@@ -1361,7 +1361,7 @@ g_checksum_get_digest (GChecksum  *checksum,
  * Since: 2.16
  */
 gchar *
-g_checksum_from_data (GChecksumType  type,
+g_checksum_from_data (GChecksumType  checksum_type,
                       const guchar  *data,
                       gsize          length)
 {
@@ -1371,7 +1371,7 @@ g_checksum_from_data (GChecksumType  type,
   g_return_val_if_fail (data != NULL, NULL);
   g_return_val_if_fail (length > 1, NULL);
 
-  checksum = g_checksum_new (type);
+  checksum = g_checksum_new (checksum_type);
   if (!checksum)
     return NULL;
 
@@ -1383,5 +1383,28 @@ g_checksum_from_data (GChecksumType  type,
   return retval;
 }
 
+/**
+ * g_checksum_from_string:
+ * @checksum_type: a #GChecksumType
+ * @str: a string
+ *
+ * Computes the checksum for @str using the algorithm @type. This is
+ * a convenience function for g_checksum_new(), g_checksum_update()
+ * and g_checksum_free().
+ *
+ * Return value: the checksum for the passed string, or %NULL. The
+ *   returned string should be freed with g_free() when done using it.
+ *
+ * Since: 2.16
+ */
+gchar *
+g_checksum_from_string (GChecksumType  checksum_type,
+                        const gchar   *str)
+{
+  g_return_val_if_fail (str != NULL, NULL);
+
+  return g_checksum_from_data (checksum_type, (const guchar *) str, strlen (str));
+}
+
 #define __G_CHECKSUM_C__
 #include "galiasdef.c"
diff --git a/glib/gchecksum.h b/glib/gchecksum.h
index 6793f90..f772ca3 100644
--- a/glib/gchecksum.h
+++ b/glib/gchecksum.h
@@ -33,20 +33,22 @@ typedef enum {
 
 typedef struct _GChecksum       GChecksum;
 
-GChecksum *           g_checksum_new        (GChecksumType     checksum_type);
-GChecksum *           g_checksum_copy       (const GChecksum  *checksum);
-void                  g_checksum_free       (GChecksum        *checksum);
-GChecksumType         g_checksum_type       (GChecksum        *checksum);
-void                  g_checksum_update     (GChecksum        *checksum,
-                                             const guchar     *data,
-                                             gsize             length);
-G_CONST_RETURN gchar *g_checksum_get_string (GChecksum        *checksum);
-gsize                 g_checksum_get_digest (GChecksum        *checksum,
-                                             guint8          **digest);
-
-gchar *               g_checksum_from_data  (GChecksumType     type,
-                                             const guchar     *data,
-                                             gsize             length);
+GChecksum *           g_checksum_new         (GChecksumType     checksum_type);
+GChecksum *           g_checksum_copy        (const GChecksum  *checksum);
+void                  g_checksum_free        (GChecksum        *checksum);
+GChecksumType         g_checksum_type        (GChecksum        *checksum);
+void                  g_checksum_update      (GChecksum        *checksum,
+                                              const guchar     *data,
+                                              gsize             length);
+G_CONST_RETURN gchar *g_checksum_get_string  (GChecksum        *checksum);
+gsize                 g_checksum_get_digest  (GChecksum        *checksum,
+                                              guint8          **digest);
+
+gchar *               g_checksum_from_data   (GChecksumType     checksum_type,
+                                              const guchar     *data,
+                                              gsize             length);
+gchar *               g_checksum_from_string (GChecksumType     checksum_type,
+                                              const gchar      *str);
 
 G_END_DECLS
 
diff --git a/glib/glib.symbols b/glib/glib.symbols
index 65100e8..0925430 100644
--- a/glib/glib.symbols
+++ b/glib/glib.symbols
@@ -181,6 +181,7 @@ g_checksum_update
 g_checksum_get_string
 g_checksum_get_digest
 g_checksum_from_data
+g_checksum_from_string
 #endif
 #endif
 
