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.23 2003/12/06 14:52:40 nilsson Exp $"); + RCSID("$Id: nettle.cmod,v 1.24 2003/12/12 21:53:42 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/nettle.cmod:374:    pop_stack();       if ((!THIS->block_size) ||    (THIS->block_size > 4096))    Pike_error("Bad block size %d.\n", THIS->block_size);       THIS->iv = (unsigned INT8 *)xalloc(THIS->block_size);    MEMSET(THIS->iv, 0, THIS->block_size);    }    +  /*! @decl string name() +  */ +  PIKEFUN string name() { +  push_constant_text("CBC"); +  } +     /*! @decl int block_size()    */    PIKEFUN int block_size() {    RETURN THIS->block_size;    }       /*! @decl int key_size()    */    PIKEFUN int key_size() {    safe_apply(THIS->object, "key_size", args);
pike.git/src/post_modules/Nettle/nettle.cmod:495:       if ((!THIS->block_size) ||    (THIS->block_size > 4096))    Pike_error("Bad block size %ld\n", DO_NOT_WARN((long)THIS->block_size));       THIS->backlog = (unsigned char *)xalloc(THIS->block_size);    THIS->backlog_len = 0;    MEMSET(THIS->backlog, 0, THIS->block_size);    }    +  /*! @decl string name() +  */ +  PIKEFUN string name() { +  push_constant_text("Proxy"); +  } +     /*! @decl int block_size()    *!    *! Get the block size of the contained block crypto.    */    PIKEFUN int block_size() {    RETURN THIS->block_size;    }       /*! @decl int key_size()    *!