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.7 2003/07/29 03:44:39 nilsson Exp $"); + RCSID("$Id: hash.cmod,v 1.8 2003/07/29 03:48:48 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:163:    Pike_error("Unsupported digest length");       length = arg->u.integer;    }       digest = begin_shared_string(length);    meta->digest(THIS->ctx, length, digest->str);    push_string(end_shared_string(digest));    }    -  /*! @decl string hash(string data) -  *! -  *! Works as a shortcut for @expr{obj->update(data)->digest()@}. -  *! -  *! @note -  *! The hash buffer will not be cleared before @[data] is added -  *! to the buffer, so data added with calls to @[update] will be -  *! prepended to the @[data]. -  *! -  *! @seealso -  *! @[update] and @[digest]. -  */ -  PIKEFUN string hash(string data) { -  f_HashState_update(args); -  pop_stack(); -  f_HashState_digest(0); -  } -  +     INIT    {    werror("HashState->INIT\n");    THIS->ctx = NULL;    }    EXIT    {    werror("HashState->EXIT\n");    if (THIS->ctx && Pike_fp->current_object->prog)    {