gssize length)
{
g_return_if_fail (checksum != NULL);
- g_return_if_fail (data != NULL);
+ g_return_if_fail (length == 0 || data != NULL);
if (length < 0)
length = strlen ((const gchar *) data);
gchar *retval;
g_return_val_if_fail (IS_VALID_TYPE (checksum_type), NULL);
- g_return_val_if_fail (data != NULL, NULL);
+ g_return_val_if_fail (length == 0 || data != NULL, NULL);
checksum = g_checksum_new (checksum_type);
if (!checksum)
gssize length)
{
g_return_val_if_fail (IS_VALID_TYPE (checksum_type), NULL);
- g_return_val_if_fail (str != NULL, NULL);
+ g_return_val_if_fail (length == 0 || str != NULL, NULL);
if (length < 0)
length = strlen (str);