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

version» Context lines:

pike.git/src/post_modules/Nettle/nettle.cmod:1:   /* nettle.cmod -*- c -*- */      #include "global.h" - RCSID("$Id: nettle.cmod,v 1.1 2003/03/12 17:07:10 nisse Exp $"); + RCSID("$Id: nettle.cmod,v 1.2 2003/03/12 20:33:33 grubba Exp $");   #include "interpret.h"   #include "svalue.h"      /* For this_object() */   #include "object.h"      #include "module_support.h"    -  + #ifdef HAVE_LIBNETTLE +    #include "nettle.h"      #include <nettle/md5.h>   #include <nettle/aes.h>   #include <nettle/sha.h>   #include <nettle/nettle-meta.h>      #include <assert.h>   #include <stdio.h>   #include <stdarg.h>
pike.git/src/post_modules/Nettle/nettle.cmod:77:   #define GET_META(o) \   ( ((struct nettle_hash_struct *) get_storage((o), nettle_hash_program)) \    ->meta)         PIKECLASS hash_state   {    INHERIT nettle_hash;       /* FIXME: The ctx pointer isn't strictly needed, as the ctx is in -  * the storage area just after the poitner. But this seems like the +  * the storage area just after the pointer. But this seems like the    * simplest and most portable way to get to it. */    CVAR void *ctx;       PIKEFUN object update(string data)    {    const struct nettle_hash *meta;       if (! THIS->ctx)    Pike_error("hash_state not properly initialized.");   
pike.git/src/post_modules/Nettle/nettle.cmod:351:    /* werror("aes->INIT\n"); */    THIS->f = NULL;    }       EXIT    {    /* werror("aes->EXIT\n"); */    memset(&THIS->ctx, 0, sizeof(THIS->ctx));    }   } +  + #endif /* HAVE_LIBNETTLE */