pike.git / src / post_modules / Nettle / hash.cmod

version» Context lines:

pike.git/src/post_modules/Nettle/hash.cmod:1:   /* hash.cmod -*- c -*- */      #include "global.h" - RCSID("$Id: hash.cmod,v 1.14 2003/11/29 00:11:39 nilsson Exp $"); + RCSID("$Id: hash.cmod,v 1.15 2004/01/23 01:05:06 nilsson Exp $");   #include "interpret.h"   #include "svalue.h"      /* For this_object() */   #include "object.h"   #include "module_support.h"      #include "nettle_config.h"      #ifdef HAVE_LIBNETTLE
pike.git/src/post_modules/Nettle/hash.cmod:156:    assert(meta);       if (!arg)    length = meta->digest_size;    else    {    if (arg->type != PIKE_T_INT)    Pike_error("Bad argument type.\n");    if (arg->u.integer < 0)    Pike_error("Invalid length, must be positive.\n"); -  if (arg->u.integer > meta->digest_size) +  if ((unsigned)arg->u.integer > meta->digest_size)    Pike_error("Unsupported digest length.\n");       length = arg->u.integer;    }       digest = begin_shared_string(length);    meta->digest(THIS->ctx, length, digest->str);    push_string(end_shared_string(digest));    }