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

version» Context lines:

pike.git/src/post_modules/Nettle/nettle.cmod:1:   /* nettle.cmod -*- c -*- */ - /* $Id: nettle.cmod,v 1.46 2008/06/28 22:53:06 nilsson Exp $ */ + /* $Id: nettle.cmod,v 1.47 2008/06/28 22:57:14 nilsson Exp $ */      #include "global.h"   #include "interpret.h"   #include "svalue.h"   /* For this_object() */   #include "object.h"   #include "operators.h"   #include "module_support.h"   #include "threads.h"   
pike.git/src/post_modules/Nettle/nettle.cmod:201:    THIS->sources = NULL;    yarrow256_init(&THIS->ctx, 0, NULL);    }       EXIT    gc_trivial;    {    if( THIS->sources )    {    free(THIS->sources); -  THIS->sources = NULL; +     }    }   }      /*! @endclass    */      /*! @decl string crypt_md5(string password, string salt)    *! Does the crypt_md5 abrakadabra (MD5 + snakeoil).    *! It is assumed that @[salt] does not contain "$".
pike.git/src/post_modules/Nettle/nettle.cmod:324:    THIS->iv = NULL;    THIS->block_size = 0;    THIS->mode = 0;    }       EXIT    gc_trivial;    {    if(THIS->object) {    free_object(THIS->object); -  THIS->object = NULL; +     }    if(THIS->iv) {    MEMSET(THIS->iv, 0, THIS->block_size);    free(THIS->iv); -  THIS->iv = NULL; +     }    }       INLINE static void cbc_encrypt_step(const unsigned INT8 *const source,    unsigned INT8 *dest)    {    INT32 block_size = THIS->block_size;    INT32 i;       for(i=0; i < block_size; i++)
pike.git/src/post_modules/Nettle/nettle.cmod:551:    THIS->backlog = NULL;    THIS->backlog_len = 0;    }       EXIT    gc_trivial;    {    if(THIS->backlog) {    MEMSET(THIS->backlog, 0, THIS->block_size);    free(THIS->backlog); -  THIS->backlog = NULL; +     }    if(THIS->object) {    free_object(THIS->object); -  THIS->object = NULL; +     }    }       /*! @decl void create(program|object|function cipher, mixed ... args)    *! Initialize the Proxy wrapper with a cipher algorithm. If it is a    *! program, an object will be instantiated with @[args] as arguments.    *! If it is an object that doesn't conform to the cipher API, but has    *! an @[LFUN::`()], that LFUN will be called. If it is a function,    *! that function will be called with @[args] as arguments.    */
pike.git/src/post_modules/Nettle/nettle.cmod:820:    CVAR struct knuth_lfib_ctx *ctx;       INIT {    THIS->ctx = xalloc(sizeof(struct knuth_lfib_ctx));    }       EXIT    gc_trivial;    {    free(THIS->ctx); -  THIS->ctx = NULL; +     }       /* @decl void create(int seed)    * The Lfib generator must be seeded with a number.    */    PIKEFUN void create(int seed)    flags ID_PROTECTED;    {    knuth_lfib_init(THIS->ctx, seed);    }