Select Git revision
idea.c 3.97 KiB
/*
* $Id: idea.c,v 1.7 1997/02/11 17:36:51 nisse Exp $
*
* IDEA crypto module for Pike
*
* /precompiled/crypto/idea
*
* Henrik Grubbstrm 1996-11-03, Niels Mller 1996-11-21
*/
/*
* Includes
*/
/* From the Pike distribution */
#include "global.h"
#include "stralloc.h"
#include "interpret.h"
#include "svalue.h"
#include "object.h"
#include "error.h"
#include "las.h"
/* Backend includes */
#include <idea.h>
/* Module specific includes */
#include "precompiled_crypto.h"
#define THIS ((unsigned INT16 *)(fp->current_storage))
#define OBTOCTX(o) ((unsigned INT16 *)(o->storage))
/*
* Globals
*/
struct program *pike_crypto_idea_program;
/*
* Functions
*/
void init_pike_crypto_idea(struct object *o)
{
MEMSET(THIS, 0, sizeof(INT16[IDEA_KEYLEN]));
}
void exit_pike_crypto_idea(struct object *o)
{
MEMSET(THIS, 0, sizeof(INT16[IDEA_KEYLEN]));
}
/*
* efuns and the like
*/
/* string name(void) */
static void f_name(INT32 args)
{
if (args) {
error("Too many arguments to idea->name()\n");
}
push_string(make_shared_string("IDEA"));
}
/* int query_block_size(void) */
static void f_query_block_size(INT32 args)
{
if (args) {
error("Too many arguments to idea->query_block_size()\n");