/* Generated from "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod" by precompile.pike running Pike v8.0 release 1089
 *
 * Do NOT edit this file.
 */

#undef PRECOMPILE_API_VERSION
#define PRECOMPILE_API_VERSION 6

#undef PRECOMPILE_SUB_PIKEVARS
#define PRECOMPILE_SUB_PIKEVARS 1

#undef PRECOMPILE_DYNAMIC_TYPES
#define PRECOMPILE_DYNAMIC_TYPES 1



#undef cmod___CMOD__
#define cmod___CMOD__ 1
#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
#line 3003 "/Users/hww3/devel/pike/lib/modules/Tools.pmod/Standalone.pmod/precompile.pike"







#line 3010 "/Users/hww3/devel/pike/lib/modules/Tools.pmod/Standalone.pmod/precompile.pike"
#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
/* -*- c -*-
|| This file is part of Pike. For copyright information see COPYRIGHT.
|| Pike is distributed under GPL, LGPL and MPL. See the file COPYING
|| for more information.
*/

#include "global.h"
#include "interpret.h"
#include "svalue.h"
#include "threads.h"

/* For this_object() */
#include "object.h"
#include "module_support.h"
#include "pike_memory.h"

#include "nettle_config.h"

#ifdef HAVE_LIBNETTLE



#ifndef PIKE_UNUSED_ATTRIBUTE
#define PIKE_UNUSED_ATTRIBUTE
#endif
#define CMOD_MAP_PROGRAM_IDS_DEFINED 1
static int ___cmod_map_program_ids(int id) PIKE_UNUSED_ATTRIBUTE;
#ifndef TYPEOF
/* Compat with older Pikes. */
#define TYPEOF(SVAL)	((SVAL).type)
#define SUBTYPEOF(SVAL)	((SVAL).subtype)
#define SET_SVAL_TYPE(SVAL, TYPE)	(TYPEOF(SVAL) = TYPE)
#define SET_SVAL_SUBTYPE(SVAL, TYPE)	(SUBTYPEOF(SVAL) = TYPE)
#define SET_SVAL(SVAL, TYPE, SUBTYPE, FIELD, EXPR) do {	\
    /* Set the type afterwards to avoid a clobbered	\
     * svalue in case EXPR throws. */			\
    (SVAL).u.FIELD = (EXPR);				\
    SET_SVAL_TYPE((SVAL), (TYPE));			\
    SET_SVAL_SUBTYPE((SVAL), (SUBTYPE));		\
  } while(0)
#endif /* !TYPEOF */
#ifndef PIKE_UNUSED
/* Compat with Pike 7.8 and earlier. */
/* NB: Not strictly correct; PIKE_UNUSED was added the
 *     day after set_program_id_to_id(), but good enough.
 */
#ifndef UNUSED
#define UNUSED(X)	X
#endif
#ifndef set_program_id_to_id
/* NB: Recent Pike 7.8 has a #define that conflicts with
 *     the following declaration.
 */
static void set_program_id_to_id(void*UNUSED(id)){}
#endif
#else /* */
PMOD_EXPORT void set_program_id_to_id( int (*to)(int) );
#endif /* !PIKE_UNUSED */


#ifndef DEFAULT_CMOD_STORAGE
#define CMOD_COND_USED
#define DEFAULT_CMOD_STORAGE static
#endif
#define module_strings_declared
static struct pike_string *module_strings[3] = {
  NULL,
  NULL,
  NULL,
};
#ifndef CMOD_COND_USED
# define f_Nettle_Hash_name_fun_num_used 1
#else
#undef f_Nettle_Hash_name_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_Hash_program_fun_num_used 1
#else
#undef Nettle_Hash_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Nettle_Hash_hash_1_fun_num_used 1
#else
#undef f_Nettle_Hash_hash_1_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Nettle_Hash_hash_2_fun_num_used 1
#else
#undef f_Nettle_Hash_hash_2_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_MD5_program_fun_num_used 1
#else
#undef Nettle_MD5_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_MD4_program_fun_num_used 1
#else
#undef Nettle_MD4_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_MD2_program_fun_num_used 1
#else
#undef Nettle_MD2_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_SHA1_program_fun_num_used 1
#else
#undef Nettle_SHA1_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_SHA224_program_fun_num_used 1
#else
#undef Nettle_SHA224_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_SHA256_program_fun_num_used 1
#else
#undef Nettle_SHA256_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_SHA384_program_fun_num_used 1
#else
#undef Nettle_SHA384_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_SHA512_program_fun_num_used 1
#else
#undef Nettle_SHA512_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_SHA3_224_program_fun_num_used 1
#else
#undef Nettle_SHA3_224_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_SHA3_256_program_fun_num_used 1
#else
#undef Nettle_SHA3_256_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_SHA3_384_program_fun_num_used 1
#else
#undef Nettle_SHA3_384_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_SHA3_512_program_fun_num_used 1
#else
#undef Nettle_SHA3_512_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_GOST94_program_fun_num_used 1
#else
#undef Nettle_GOST94_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_Hash_f_Nettle_Hash_hash_fun_num_used 1
#else
#undef Nettle_Hash_f_Nettle_Hash_hash_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_MD5_State_program_fun_num_used 1
#else
#undef Nettle_MD5_State_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Nettle_Hash_crypt_hash_fun_num_used 1
#else
#undef f_Nettle_Hash_crypt_hash_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_MD4_State_program_fun_num_used 1
#else
#undef Nettle_MD4_State_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_MD2_State_program_fun_num_used 1
#else
#undef Nettle_MD2_State_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_SHA1_State_program_fun_num_used 1
#else
#undef Nettle_SHA1_State_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_SHA224_State_program_fun_num_used 1
#else
#undef Nettle_SHA224_State_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_SHA256_State_program_fun_num_used 1
#else
#undef Nettle_SHA256_State_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_SHA384_State_program_fun_num_used 1
#else
#undef Nettle_SHA384_State_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_SHA512_State_program_fun_num_used 1
#else
#undef Nettle_SHA512_State_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_SHA3_224_State_program_fun_num_used 1
#else
#undef Nettle_SHA3_224_State_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_SHA3_256_State_program_fun_num_used 1
#else
#undef Nettle_SHA3_256_State_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_SHA3_384_State_program_fun_num_used 1
#else
#undef Nettle_SHA3_384_State_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_SHA3_512_State_program_fun_num_used 1
#else
#undef Nettle_SHA3_512_State_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_RIPEMD160_State_program_fun_num_used 1
#else
#undef Nettle_RIPEMD160_State_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_RIPEMD160_program_fun_num_used 1
#else
#undef Nettle_RIPEMD160_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_GOST94_State_program_fun_num_used 1
#else
#undef Nettle_GOST94_State_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define Nettle_Hash_State_program_fun_num_used 1
#else
#undef Nettle_Hash_State_program_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Nettle_Hash_State_digest_fun_num_used 1
#else
#undef f_Nettle_Hash_State_digest_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Nettle_Hash_State_update_fun_num_used 1
#else
#undef f_Nettle_Hash_State_update_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Nettle_Hash_digest_size_fun_num_used 1
#else
#undef f_Nettle_Hash_digest_size_fun_num_used
#endif
#ifndef CMOD_COND_USED
# define f_Nettle_Hash_block_size_fun_num_used 1
#else
#undef f_Nettle_Hash_block_size_fun_num_used
#endif
#line 23 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
#include "nettle.h"

#include <nettle/md5.h>
#ifdef HAVE_NETTLE_MD4_INIT
#include <nettle/md4.h>
#include <nettle/md2.h>
#endif
#include <nettle/sha.h>
#ifdef HAVE_NETTLE_SHA3_H
#include <nettle/sha3.h>
#endif
#ifdef HAVE_NETTLE_RIPEMD160_H
#include <nettle/ripemd160.h>
#endif
#ifdef HAVE_NETTLE_GOSTHASH94_H
#include <nettle/gosthash94.h>
#endif
#include <nettle/nettle-meta.h>

#include <stdio.h>
#include <stdarg.h>
#include "fdlib.h"

/*! @module Nettle */

/*! @class Hash
 *!
 *! Represents information about a hash algorithm, such as
 *! name, digest size, and internal block size.
 */

#undef class_Nettle_Hash_defined
#define class_Nettle_Hash_defined
DEFAULT_CMOD_STORAGE struct program *Nettle_Hash_program=NULL;

#ifdef Nettle_Hash_program_fun_num_used
DEFAULT_CMOD_STORAGE int Nettle_Hash_program_fun_num=-1;
#endif /* Nettle_Hash_program_fun_num_used */
/*! @decl inherit __builtin.Nettle.Hash
   */

#undef inherit_cq__22__builtin_2ENettle_2EHash_22_Nettle_Hash_defined
#define inherit_cq__22__builtin_2ENettle_2EHash_22_Nettle_Hash_defined
#line 57 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
static int Nettle_Hash_cq__22__builtin_2ENettle_2EHash_22_inh_num = -1;
#line 57 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
static int Nettle_Hash_cq__22__builtin_2ENettle_2EHash_22_inh_offset = -1;

#undef var_meta_Nettle_Hash_defined
#define var_meta_Nettle_Hash_defined

#undef THIS
#define THIS ((struct Nettle_Hash_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef THIS_NETTLE_HASH
#define THIS_NETTLE_HASH ((struct Nettle_Hash_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef OBJ2_NETTLE_HASH
#define OBJ2_NETTLE_HASH(o) ((struct Nettle_Hash_struct *)(o->storage+Nettle_Hash_storage_offset))

#undef GET_NETTLE_HASH_STORAGE
#define GET_NETTLE_HASH_STORAGE(o) ((struct Nettle_Hash_struct *)(o->storage+Nettle_Hash_storage_offset)
static ptrdiff_t Nettle_Hash_storage_offset;
struct Nettle_Hash_struct {

#ifdef var_meta_Nettle_Hash_defined
#line 59 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
const struct nettle_hash *meta;
#endif /* var_meta_Nettle_Hash_defined */
};
#ifdef PIKE_DEBUG
/* Ensure the struct is used in a variable declaration, or else gdb might not see it. */
static struct Nettle_Hash_struct *Nettle_Hash_gdb_dummy_ptr;
#endif
/*! @decl string(0..255) name(void)
   *!
   *! Returns a human readable name for the algorithm.
   */
#define f_Nettle_Hash_name_defined

#ifdef f_Nettle_Hash_name_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Nettle_Hash_name_fun_num = 0;

#endif /* f_Nettle_Hash_name_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Nettle_Hash_name(INT32 args) {
#line 65 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
if(args != 0) wrong_number_of_args_error("name",args,0);
#line 67 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
{
if (!THIS->meta)
Pike_error("Hash not properly initialized.\n");

push_text(THIS->meta->name);
}

}
/*! @decl int(0..) digest_size(void)
   *!
   *! Returns the size of a hash digest.
   */
#define f_Nettle_Hash_digest_size_defined

#ifdef f_Nettle_Hash_digest_size_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Nettle_Hash_digest_size_fun_num = 0;

#endif /* f_Nettle_Hash_digest_size_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Nettle_Hash_digest_size(INT32 args) {
#line 78 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
if(args != 0) wrong_number_of_args_error("digest_size",args,0);
#line 80 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
{
if (!THIS->meta)
Pike_error("Hash not properly initialized.\n");

push_int(THIS->meta->digest_size);
}

}
/*! @decl int(0..) block_size(void)
   *!
   *! Returns the internal block size of the hash algorithm.
   */
#define f_Nettle_Hash_block_size_defined

#ifdef f_Nettle_Hash_block_size_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Nettle_Hash_block_size_fun_num = 0;

#endif /* f_Nettle_Hash_block_size_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Nettle_Hash_block_size(INT32 args) {
#line 91 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
if(args != 0) wrong_number_of_args_error("block_size",args,0);
#line 93 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
{
if (!THIS->meta)
Pike_error("Hash not properly initialized.\n");

push_int(THIS->meta->block_size);
}


}
/*! @decl string(0..255) hash(string(0..255) data)
   *!
   *!  Works as a (faster) shortcut for
   *!  @expr{State()->update(data)->digest()@}, where State is
   *!  the hash state class corresponding to this Hash.
   *!
   *! @seealso
   *!   @[State()->update()] and @[State()->digest()].
   */
#define f_Nettle_Hash_hash_1_defined

#ifdef f_Nettle_Hash_hash_1_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Nettle_Hash_hash_1_fun_num = 0;

#endif /* f_Nettle_Hash_hash_1_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Nettle_Hash_hash_1(INT32 args) {
#line 110 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
struct pike_string * in;
#line 110 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
if(args != 1) wrong_number_of_args_error("hash",args,1);
#line 110 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("hash",1,"string(0..255)");
#line 110 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
debug_malloc_pass(in=Pike_sp[0-1].u.string);
#line 112 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
{
void *ctx;
struct pike_string *out;
unsigned digest_length;
const struct nettle_hash *meta = THIS->meta;

if (!meta)
Pike_error("Hash not properly initialized.\n");
NO_WIDE_STRING(in);

ctx = alloca(meta->context_size);
if(!ctx)
SIMPLE_OUT_OF_MEMORY_ERROR("hash", meta->context_size);

/* Only thread this block for significant data size */
if (in->len > HASH_THREADS_ALLOW_THRESHOLD) {
THREADS_ALLOW();
meta->init(ctx);
meta->update(ctx, in->len, (const uint8_t *)in->str);
THREADS_DISALLOW();
} else {
meta->init(ctx);
meta->update(ctx, in->len, (const uint8_t *)in->str);
}

digest_length = meta->digest_size;
out = begin_shared_string(digest_length);
meta->digest(ctx, digest_length, (uint8_t *)out->str);

pop_n_elems(args);
push_string(end_shared_string(out));
}

}
#line 145 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
int is_stdio_file(struct object *o)
{
struct program *p = o->prog;
INT32 i = p->num_inherits;
while( i-- )
{
if( p->inherits[i].prog->id == PROG_STDIO_FD_ID ||
p->inherits[i].prog->id == PROG_STDIO_FD_REF_ID )
return 1;
}
return 0;
}

/*! @decl string(0..255) hash(Stdio.File file, void|int bytes)
   *!
   *!  Works as a (faster) shortcut for
   *!  @expr{State()->update(Stdio.read_file(file))->digest()@},
   *!  where State is the hash state class corresponding to this
   *!  Hash.
   *!
   *! @param bytes
   *!   The number of bytes of the file object @[file] that should be
   *!   hashed. Negative numbers are ignored and the whole file is
   *!   hashed.
   *!
   *! @seealso
   *!   @[Stdio.File], @[State()->update()] and
   *!   @[State()->digest()].
   */
#define f_Nettle_Hash_hash_2_defined

#ifdef f_Nettle_Hash_hash_2_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Nettle_Hash_hash_2_fun_num = 0;

#endif /* f_Nettle_Hash_hash_2_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Nettle_Hash_hash_2(INT32 args) {
#line 174 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
struct object * in;
#line 174 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
struct svalue * bytes;
#line 174 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
if(args < 1) wrong_number_of_args_error("hash_2",args,1);
#line 174 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
if(args > 2) wrong_number_of_args_error("hash_2",args,2);
#line 174 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
if(TYPEOF(Pike_sp[0-args]) != PIKE_T_OBJECT) SIMPLE_ARG_TYPE_ERROR("hash",1,"object");
#line 174 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
debug_malloc_pass(in=Pike_sp[0-args].u.object);
#line 174 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
if ((args > 1) &&
    ((TYPEOF(Pike_sp[1-args]) != PIKE_T_INT) ||
     (SUBTYPEOF(Pike_sp[1-args]) != NUMBER_UNDEFINED))) {
#line 174 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
if(TYPEOF(Pike_sp[1-args]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("hash",2,"void|int");
#line 174 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
bytes=Pike_sp+1-args; dmalloc_touch_svalue(Pike_sp+1-args);
#line 174 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
} else bytes = NULL;
#line 176 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
{
void *ctx;
int len, fd;
char *read_buffer;
PIKE_STAT_T st;
struct pike_string *out;
const struct nettle_hash *meta = THIS->meta;

if (!meta)
Pike_error("HashInfo not properly initialized.\n");

if (!is_stdio_file(in))
Pike_error("Object not Fd or Fd_ref, or subclass.\n");

apply(in, "query_fd", 0);
fd = Pike_sp[-1].u.integer;
pop_stack();

if (fd_fstat(fd, &st)<0)
Pike_error("File not found!\n");

if (!S_ISREG(st.st_mode))
Pike_error("Non-regular file.\n");

ctx = alloca(meta->context_size);
if (!ctx)
SIMPLE_OUT_OF_MEMORY_ERROR("hash", meta->context_size);

read_buffer=xalloc(8192);

THREADS_ALLOW();
meta->init(ctx);
if(bytes && bytes->u.integer>-1) {
int bytes_left = bytes->u.integer;
int read_bytes = MINIMUM(8192, bytes_left);
while(read_bytes>0 && (len=fd_read(fd, read_buffer, read_bytes))>0) {
meta->update(ctx, len, (const uint8_t *)read_buffer);
bytes_left -= read_bytes;
read_bytes = MINIMUM(8192, bytes_left);
}
}
else
while((len=fd_read(fd, read_buffer, 8192))>0)
meta->update(ctx, len, (const uint8_t *)read_buffer);

free(read_buffer);

THREADS_DISALLOW();
out = begin_shared_string(meta->digest_size);
meta->digest(ctx, meta->digest_size, (uint8_t *)out->str);

pop_n_elems(args);
push_string(end_shared_string(out));
}

}

#if defined(f_Nettle_Hash_hash_1_defined) || defined(f_Nettle_Hash_hash_2_defined)
#define f_Nettle_Hash_hash_defined

#ifdef Nettle_Hash_f_Nettle_Hash_hash_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t Nettle_Hash_f_Nettle_Hash_hash_fun_num = 0;

#endif /* Nettle_Hash_f_Nettle_Hash_hash_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Nettle_Hash_hash(INT32 args) {
  switch(args) {
   case 1:
    switch(TYPEOF(Pike_sp[0-1])) {
     case PIKE_T_OBJECT:

#ifdef f_Nettle_Hash_hash_2_defined
      f_Nettle_Hash_hash_2(args);
      return;

#endif /* f_Nettle_Hash_hash_2_defined */
      break;
     case PIKE_T_STRING:

#ifdef f_Nettle_Hash_hash_1_defined
      f_Nettle_Hash_hash_1(args);
      return;

#endif /* f_Nettle_Hash_hash_1_defined */
      break;
     default:
      SIMPLE_BAD_ARG_ERROR("hash",1,"object|string");
    }
   case 2:

#ifdef f_Nettle_Hash_hash_2_defined
    f_Nettle_Hash_hash_2(args);
    return;

#endif /* f_Nettle_Hash_hash_2_defined */
    break;
   default:
    wrong_number_of_args_error("hash",args,1);
  }
}

#endif /* f_Nettle_Hash_hash_1_defined, f_Nettle_Hash_hash_2_defined */
#line 231 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
/* NOTE: This is NOT the MIME base64 table! */
static const char b64tab[64] =
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";

static inline void b64enc(char *dest, int a, int b, int c, int sz)
{
unsigned int bitbuf = a | (b << 8) | (c << 16);
while (sz--) {
*(dest++) = b64tab[bitbuf & 63];
bitbuf >>= 6;
}
}

/*! @decl string(0..127) crypt_hash(string(0..255) password, @
   *!                                 string(0..255) salt, int rounds)
   *!
   *!   Password hashing function in @[crypt_md5()]-style.
   *!
   *!   Implements the algorithm described in
   *!   @url{http://www.akkadia.org/drepper/SHA-crypt.txt@}.
   *!
   *!   This is the algorithm used by @tt{crypt(2)@} in
   *!   methods @tt{$5$@} (SHA256) and @tt{$6$@} (SHA512).
   *!
   *!   The @[password] memory will be cleared before released.
   *!
   *! @seealso
   *!   @[crypt_md5()]
   */
#define f_Nettle_Hash_crypt_hash_defined

#ifdef f_Nettle_Hash_crypt_hash_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Nettle_Hash_crypt_hash_fun_num = 0;

#endif /* f_Nettle_Hash_crypt_hash_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Nettle_Hash_crypt_hash(INT32 args) {
#line 260 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
struct pike_string * password;
struct pike_string * salt;
#line 261 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
INT_TYPE rounds;
#line 260 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
if(args != 3) wrong_number_of_args_error("crypt_hash",args,3);
#line 260 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
if(TYPEOF(Pike_sp[0-3]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("crypt_hash",1,"string");
#line 260 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
debug_malloc_pass(password=Pike_sp[0-3].u.string);
if(TYPEOF(Pike_sp[1-3]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("crypt_hash",2,"string");
#line 261 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
debug_malloc_pass(salt=Pike_sp[1-3].u.string);
#line 261 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
if(TYPEOF(Pike_sp[2-3]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("crypt_hash",3,"int");
#line 261 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
rounds=Pike_sp[2-3].u.integer;
#line 267 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
{
struct pike_string *res;
const struct nettle_hash *meta = THIS->meta;
void *ctx;
uint8_t *abcbuf;
uint8_t *dpbuf;
uint8_t *dsbuf;

unsigned char *p;
unsigned char *s;
int plen;
int slen;
int dsz;

int i;
int r;

int a, b, c;

if (!meta)
Pike_error("HashInfo not properly initialized.\n");

if (!rounds) rounds = 5000;
if (rounds < 1000) rounds = 1000;
if (rounds > 999999999) rounds = 999999999;

/* Censor the password. */
push_string(password);
args++;
add_ref(Pike_sp[-args].u.string = module_strings[0] /* "censored" */);

NO_WIDE_STRING(password);
NO_WIDE_STRING(salt);

password->flags |= STRING_CLEAR_ON_EXIT;

ctx = alloca(meta->context_size);
if (!ctx)
SIMPLE_OUT_OF_MEMORY_ERROR("crypt_hash", meta->context_size);

abcbuf = alloca(meta->digest_size * 3);
if (!abcbuf)
SIMPLE_OUT_OF_MEMORY_ERROR("crypt_hash", meta->digest_size * 3);

dpbuf = abcbuf + meta->digest_size;
dsbuf = dpbuf + meta->digest_size;

/* NB: We use these to allow the compiler to
     *     avoid dereferencing at every step.
     */
p = (unsigned char*)password->str;
plen = password->len;
s = (unsigned char*)salt->str;
slen = salt->len;
if (slen > 16) slen = 16;
dsz = meta->digest_size;

/* NB: We allocate the result here to avoid throwing away all the work
     *     on out of memory at the end.
     */
if (dsz == 32) {
/* 4 * (30/3) + 3 */
res = begin_shared_string(43);
} else if (dsz == 64) {
/* 4 * (63/3) + 2 */
res = begin_shared_string(86);
} else {
Pike_error("crypt_hash() not supported for this digest size yet (%d).\n",
dsz);
}

THREADS_ALLOW();

/* NB: Comments refer to http://www.akkadia.org/drepper/SHA-crypt.txt */
meta->init(ctx); /* 4 */
meta->update(ctx, plen, p); /* 5 */
meta->update(ctx, slen, s); /* 6 */
meta->update(ctx, plen, p); /* 7 */
meta->digest(ctx, dsz, abcbuf); /* 8 */

meta->init(ctx); /* 1 */
meta->update(ctx, plen, p); /* 2 */
meta->update(ctx, slen, s); /* 3 */

for (i = 0; i + dsz < plen; i += dsz) { /* 9 */
meta->update(ctx, dsz, abcbuf);
}

meta->update(ctx, plen - i, abcbuf); /* 10 */

for (i = 1; i < plen; i <<= 1) { /* 11 */
if (plen & i) {
meta->update(ctx, dsz, abcbuf);
} else {
meta->update(ctx, plen, p);
}
}

meta->digest(ctx, dsz, abcbuf); /* 12 */

meta->init(ctx); /* 13 */
for (i = 0; i < plen; i++) { /* 14 */
meta->update(ctx, plen, p);
}
meta->digest(ctx, dsz, dpbuf); /* 15 */

/* Sequence P is implicit. */ /* 16 */

meta->init(ctx); /* 17 */
for(i = 0; i < 16 + abcbuf[0]; i++) { /* 18 */
meta->update(ctx, slen, s);
}
meta->digest(ctx, dsz, dsbuf); /* 19 */

/* Sequence S is implicit. */ /* 20 */

for (r = 0; r < rounds; r++) { /* 21 */
meta->init(ctx); /* a */
if (r & 1) { /* b */
for (i = 0; i + dsz < plen; i += dsz) {
meta->update(ctx, dsz, dpbuf);
}
meta->update(ctx, plen - i, dpbuf);
} else {
meta->update(ctx, dsz, abcbuf); /* c */
}
if (r % 3) { /* d */
for (i = 0; i + dsz < slen; i += dsz) {
meta->update(ctx, dsz, dsbuf);
}
meta->update(ctx, slen - i, dsbuf);
}
if (r % 7) { /* e */
for (i = 0; i + dsz < plen; i += dsz) {
meta->update(ctx, dsz, dpbuf);
}
meta->update(ctx, plen - i, dpbuf);
}
if (r & 1) { /* f */
meta->update(ctx, dsz, abcbuf);
} else { /* g */
for (i = 0; i + dsz < plen; i += dsz) {
meta->update(ctx, dsz, dpbuf);
}
meta->update(ctx, plen - i, dpbuf);
}
meta->digest(ctx, dsz, abcbuf); /* h */
}
THREADS_DISALLOW();

/* And now time for some pointless shuffling of the result.
     * Note that the shuffling is slightly different between
     * the two cases.
     *
     * This is followed by a custom base64-style encoding.
     */
c = 0;
b = dsz/3;
a = 2*b;
if (dsz == 32) {
for (i = 0, r = 0; i + 3 < dsz; i+=3, r+=4) {
int t;
b64enc(res->str + r, abcbuf[a], abcbuf[b], abcbuf[c], 4);

t = a+1;
a = b+1;
b = c+1;
c = t;
}
b64enc(res->str + r, abcbuf[30], abcbuf[31], 0, 3);
} else {
for (i = 0, r = 0; i + 3 < dsz; i+=3, r+=4) {
int t;
b64enc(res->str + r, abcbuf[a], abcbuf[b], abcbuf[c], 4);

t = a+1;
a = c+1;
c = b+1;
b = t;
}
b64enc(res->str + r, abcbuf[63], 0, 0, 2);
}

push_string(end_shared_string(res)); /* 22e */

/* Clean intermediate values. */
memset(ctx, 0, meta->context_size);
memset(abcbuf, 0, 3*dsz);
}

}

#undef internal_init_Nettle_Hash_defined
#define internal_init_Nettle_Hash_defined

#undef Nettle_Hash_event_handler_defined
#define Nettle_Hash_event_handler_defined
static void init_Nettle_Hash_struct(void)
#line 458 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
{
werror("Hash->INIT\n");
THIS->meta = NULL;
}

/*! @class State
   *!
   *! Base class for hashing contexts.
   */

#undef class_Nettle_Hash_State_defined
#define class_Nettle_Hash_State_defined
DEFAULT_CMOD_STORAGE struct program *Nettle_Hash_State_program=NULL;

#ifdef Nettle_Hash_State_program_fun_num_used
DEFAULT_CMOD_STORAGE int Nettle_Hash_State_program_fun_num=-1;
#endif /* Nettle_Hash_State_program_fun_num_used */
/*! @decl inherit Hash::State
*/


#undef extra_Nettle_Hash_State_defined
#define extra_Nettle_Hash_State_defined
#line 498 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
#define GET_META(o)						\
    ( ((struct Nettle_Hash_struct *)parent_storage(1, Nettle_Hash_program))->meta )


#undef var_ctx_Nettle_Hash_State_defined
#define var_ctx_Nettle_Hash_State_defined

#undef THIS
#define THIS ((struct Nettle_Hash_State_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef THIS_NETTLE_HASH_STATE
#define THIS_NETTLE_HASH_STATE ((struct Nettle_Hash_State_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef OBJ2_NETTLE_HASH_STATE
#define OBJ2_NETTLE_HASH_STATE(o) ((struct Nettle_Hash_State_struct *)(o->storage+Nettle_Hash_State_storage_offset))

#undef GET_NETTLE_HASH_STATE_STORAGE
#define GET_NETTLE_HASH_STATE_STORAGE(o) ((struct Nettle_Hash_State_struct *)(o->storage+Nettle_Hash_State_storage_offset)
static ptrdiff_t Nettle_Hash_State_storage_offset;
struct Nettle_Hash_State_struct {

#ifdef var_ctx_Nettle_Hash_State_defined
#line 501 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
void *ctx;
#endif /* var_ctx_Nettle_Hash_State_defined */
};
#ifdef PIKE_DEBUG
/* Ensure the struct is used in a variable declaration, or else gdb might not see it. */
static struct Nettle_Hash_State_struct *Nettle_Hash_State_gdb_dummy_ptr;
#endif
#line 503 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
/* FIXME: Create should copy state from the other object, if
     * provided. */

/*! @decl State update(string(0..255) data)
     *!
     *! Hashes more data.
     *!
     *! @returns
     *!   Returns @expr{this@} in order to simplify chaining
     *!   of function calls.
     */
#define f_Nettle_Hash_State_update_defined

#ifdef f_Nettle_Hash_State_update_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Nettle_Hash_State_update_fun_num = 0;

#endif /* f_Nettle_Hash_State_update_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Nettle_Hash_State_update(INT32 args) {
#line 514 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
struct pike_string * data;
#line 514 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
if(args != 1) wrong_number_of_args_error("update",args,1);
#line 514 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
if(TYPEOF(Pike_sp[0-1]) != PIKE_T_STRING) SIMPLE_ARG_TYPE_ERROR("update",1,"string(0..255)");
#line 514 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
debug_malloc_pass(data=Pike_sp[0-1].u.string);
#line 517 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
{
void *ctx = THIS->ctx;
const struct nettle_hash *meta =
GET_META(Pike_fp->current_object);

if (!ctx || !meta)
Pike_error("State not properly initialized.\n");

NO_WIDE_STRING(data);

/* Only thread this block for significant data size */
if (data->len > HASH_THREADS_ALLOW_THRESHOLD) {
THREADS_ALLOW();
meta->update(ctx, data->len, (const uint8_t *)data->str);
THREADS_DISALLOW();
} else {
meta->update(ctx, data->len, (const uint8_t *)data->str);
}

push_object(this_object());
}

}
/*! @decl string(0..255) digest(int|void length)
     *!
     *! Generates a digest, and resets the hashing contents.
     *!
     *! @param length
     *!   If the length argument is provided, the digest is truncated
     *!   to the given length.
     *!
     *! @returns
     *!   The digest.
     */
#define f_Nettle_Hash_State_digest_defined

#ifdef f_Nettle_Hash_State_digest_fun_num_used
DEFAULT_CMOD_STORAGE ptrdiff_t f_Nettle_Hash_State_digest_fun_num = 0;

#endif /* f_Nettle_Hash_State_digest_fun_num_used */
DEFAULT_CMOD_STORAGE void f_Nettle_Hash_State_digest(INT32 args) {
#line 550 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
struct svalue * arg;
#line 550 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
if(args > 1) wrong_number_of_args_error("digest",args,1);
#line 550 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
if ((args > 0) &&
    ((TYPEOF(Pike_sp[0-args]) != PIKE_T_INT) ||
     (SUBTYPEOF(Pike_sp[0-args]) != NUMBER_UNDEFINED))) {
#line 550 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
if(TYPEOF(Pike_sp[0-args]) != PIKE_T_INT) SIMPLE_ARG_TYPE_ERROR("digest",1,"int|void");
#line 550 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
arg=Pike_sp+0-args; dmalloc_touch_svalue(Pike_sp+0-args);
#line 550 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
} else arg = NULL;
{
const struct nettle_hash *meta;
struct pike_string *digest;
unsigned length;

meta = GET_META(Pike_fp->current_object);

if (!THIS->ctx || !meta)
Pike_error("State not properly initialized.\n");

if (!arg)
length = meta->digest_size;
else
{
if (TYPEOF(*arg) != PIKE_T_INT)
Pike_error("Bad argument type.\n");
if (arg->u.integer < 0)
Pike_error("Invalid length, must be positive.\n");
if ((unsigned)arg->u.integer > meta->digest_size)
Pike_error("Unsupported digest length.\n");

length = arg->u.integer;
}

digest = begin_shared_string(length);
meta->digest(THIS->ctx, length, (uint8_t *)digest->str);
push_string(end_shared_string(digest));
}

}

#undef internal_init_Nettle_Hash_State_defined
#define internal_init_Nettle_Hash_State_defined

#undef Nettle_Hash_State_event_handler_defined
#define Nettle_Hash_State_event_handler_defined
static void init_Nettle_Hash_State_struct(void)
#line 581 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
{
werror("State->INIT\n");
THIS->ctx = NULL;
}


#undef Nettle_Hash_State_gc_live_obj
#define Nettle_Hash_State_gc_live_obj

#undef internal_exit_Nettle_Hash_State_defined
#define internal_exit_Nettle_Hash_State_defined

#undef Nettle_Hash_State_event_handler_defined
#define Nettle_Hash_State_event_handler_defined
static void exit_Nettle_Hash_State_struct(void)
#line 587 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
{
werror("State->EXIT\n");
if (THIS->ctx)
{
const struct nettle_hash *meta =
GET_META(Pike_fp->current_object);
if (meta) {
memset(THIS->ctx, 0, meta->context_size);
}
}
}

#ifdef Nettle_Hash_State_event_handler_defined
static void Nettle_Hash_State_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Nettle_Hash_State_defined
  case PROG_EVENT_INIT: init_Nettle_Hash_State_struct(); break;

#endif /* internal_init_Nettle_Hash_State_defined */

#ifdef internal_exit_Nettle_Hash_State_defined
  case PROG_EVENT_EXIT: exit_Nettle_Hash_State_struct(); break;

#endif /* internal_exit_Nettle_Hash_State_defined */
  default: break; 
  }
}

#endif /* Nettle_Hash_State_event_handler_defined */
/*! @endclass State */


#ifdef Nettle_Hash_event_handler_defined
static void Nettle_Hash_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Nettle_Hash_defined
  case PROG_EVENT_INIT: init_Nettle_Hash_struct(); break;

#endif /* internal_init_Nettle_Hash_defined */
  default: break; 
  }
}

#endif /* Nettle_Hash_event_handler_defined */
/*! @endclass Hash */

#line 606 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
/* The algorithm objects can be overloaded in pike. */





#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
/* -*- C -*-
 *
 * Cmod header-file acting as a template for the hash classes.
 */

/*! @class MD5
*!
*! Implementation of the MD5 hash algorithm.
*!
*/

#undef class_Nettle_MD5_defined
#define class_Nettle_MD5_defined
DEFAULT_CMOD_STORAGE struct program *Nettle_MD5_program=NULL;

#ifdef Nettle_MD5_program_fun_num_used
DEFAULT_CMOD_STORAGE int Nettle_MD5_program_fun_num=-1;
#endif /* Nettle_MD5_program_fun_num_used */
/*! @decl inherit Hash
*/

#undef inherit_Nettle_Hash_Nettle_MD5_defined
#define inherit_Nettle_Hash_Nettle_MD5_defined
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
static int Nettle_MD5_Nettle_Hash_inh_num = -1;
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
static int Nettle_MD5_Nettle_Hash_inh_offset = -1;

#undef internal_init_Nettle_MD5_defined
#define internal_init_Nettle_MD5_defined

#undef Nettle_MD5_event_handler_defined
#define Nettle_MD5_event_handler_defined
static void init_Nettle_MD5_struct(void)
#line 18 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
struct Nettle_Hash_struct *hash;
ASSIGN_CURRENT_STORAGE(hash, struct Nettle_Hash_struct, 1,
Nettle_Hash_program);

werror( "MD5"  "->INIT\n");

hash->meta = &nettle_md5;
}

/*! @class State
*!
*! State for MD5 hashing.
*!
*/

#undef class_Nettle_MD5_State_defined
#define class_Nettle_MD5_State_defined
DEFAULT_CMOD_STORAGE struct program *Nettle_MD5_State_program=NULL;

#ifdef Nettle_MD5_State_program_fun_num_used
DEFAULT_CMOD_STORAGE int Nettle_MD5_State_program_fun_num=-1;
#endif /* Nettle_MD5_State_program_fun_num_used */
/*! @decl inherit Hash::State
*/


#undef extra_Nettle_MD5_State_defined
#define extra_Nettle_MD5_State_defined

#undef var_md5_Nettle_MD5_State_defined
#define var_md5_Nettle_MD5_State_defined

#undef THIS
#define THIS ((struct Nettle_MD5_State_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef THIS_NETTLE_MD5_STATE
#define THIS_NETTLE_MD5_STATE ((struct Nettle_MD5_State_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef OBJ2_NETTLE_MD5_STATE
#define OBJ2_NETTLE_MD5_STATE(o) ((struct Nettle_MD5_State_struct *)(o->storage+Nettle_MD5_State_storage_offset))

#undef GET_NETTLE_MD5_STATE_STORAGE
#define GET_NETTLE_MD5_STATE_STORAGE(o) ((struct Nettle_MD5_State_struct *)(o->storage+Nettle_MD5_State_storage_offset)
static ptrdiff_t Nettle_MD5_State_storage_offset;
struct Nettle_MD5_State_struct {

#ifdef var_md5_Nettle_MD5_State_defined
#line 64 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
struct md5_ctx md5;
#endif /* var_md5_Nettle_MD5_State_defined */
};
#ifdef PIKE_DEBUG
/* Ensure the struct is used in a variable declaration, or else gdb might not see it. */
static struct Nettle_MD5_State_struct *Nettle_MD5_State_gdb_dummy_ptr;
#endif

#undef internal_init_Nettle_MD5_State_defined
#define internal_init_Nettle_MD5_State_defined

#undef Nettle_MD5_State_event_handler_defined
#define Nettle_MD5_State_event_handler_defined
static void init_Nettle_MD5_State_struct(void)
#line 67 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
struct Nettle_Hash_State_struct *instance;
ASSIGN_CURRENT_STORAGE(instance, struct Nettle_Hash_State_struct, 1,
Nettle_Hash_State_program);

werror( "MD5"  ".State->INIT\n");

md5_init(&THIS->md5); 
instance->ctx = &THIS->md5;
}

#ifdef Nettle_MD5_State_event_handler_defined
static void Nettle_MD5_State_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Nettle_MD5_State_defined
  case PROG_EVENT_INIT: init_Nettle_MD5_State_struct(); break;

#endif /* internal_init_Nettle_MD5_State_defined */
  default: break; 
  }
}

#endif /* Nettle_MD5_State_event_handler_defined */
/*! @endclass State
*/


#ifdef Nettle_MD5_event_handler_defined
static void Nettle_MD5_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Nettle_MD5_defined
  case PROG_EVENT_INIT: init_Nettle_MD5_struct(); break;

#endif /* internal_init_Nettle_MD5_defined */
  default: break; 
  }
}

#endif /* Nettle_MD5_event_handler_defined */
/*! @endclass MD5
*/


#line 86 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#line 612 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"




#line 616 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
#ifdef HAVE_NETTLE_MD4_INIT



#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
/* -*- C -*-
 *
 * Cmod header-file acting as a template for the hash classes.
 */

/*! @class MD4
*!
*! Implementation of the MD4 hash algorithm.
*!
*/

#undef class_Nettle_MD4_defined
#define class_Nettle_MD4_defined
DEFAULT_CMOD_STORAGE struct program *Nettle_MD4_program=NULL;

#ifdef Nettle_MD4_program_fun_num_used
DEFAULT_CMOD_STORAGE int Nettle_MD4_program_fun_num=-1;
#endif /* Nettle_MD4_program_fun_num_used */
/*! @decl inherit Hash
*/

#undef inherit_Nettle_Hash_Nettle_MD4_defined
#define inherit_Nettle_Hash_Nettle_MD4_defined
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
static int Nettle_MD4_Nettle_Hash_inh_num = -1;
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
static int Nettle_MD4_Nettle_Hash_inh_offset = -1;

#undef internal_init_Nettle_MD4_defined
#define internal_init_Nettle_MD4_defined

#undef Nettle_MD4_event_handler_defined
#define Nettle_MD4_event_handler_defined
static void init_Nettle_MD4_struct(void)
#line 18 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
struct Nettle_Hash_struct *hash;
ASSIGN_CURRENT_STORAGE(hash, struct Nettle_Hash_struct, 1,
Nettle_Hash_program);

werror( "MD4"  "->INIT\n");

hash->meta = &nettle_md4;
}

/*! @class State
*!
*! State for MD4 hashing.
*!
*/

#undef class_Nettle_MD4_State_defined
#define class_Nettle_MD4_State_defined
DEFAULT_CMOD_STORAGE struct program *Nettle_MD4_State_program=NULL;

#ifdef Nettle_MD4_State_program_fun_num_used
DEFAULT_CMOD_STORAGE int Nettle_MD4_State_program_fun_num=-1;
#endif /* Nettle_MD4_State_program_fun_num_used */
/*! @decl inherit Hash::State
*/


#undef extra_Nettle_MD4_State_defined
#define extra_Nettle_MD4_State_defined

#undef var_md4_Nettle_MD4_State_defined
#define var_md4_Nettle_MD4_State_defined

#undef THIS
#define THIS ((struct Nettle_MD4_State_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef THIS_NETTLE_MD4_STATE
#define THIS_NETTLE_MD4_STATE ((struct Nettle_MD4_State_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef OBJ2_NETTLE_MD4_STATE
#define OBJ2_NETTLE_MD4_STATE(o) ((struct Nettle_MD4_State_struct *)(o->storage+Nettle_MD4_State_storage_offset))

#undef GET_NETTLE_MD4_STATE_STORAGE
#define GET_NETTLE_MD4_STATE_STORAGE(o) ((struct Nettle_MD4_State_struct *)(o->storage+Nettle_MD4_State_storage_offset)
static ptrdiff_t Nettle_MD4_State_storage_offset;
struct Nettle_MD4_State_struct {

#ifdef var_md4_Nettle_MD4_State_defined
#line 64 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
struct md4_ctx md4;
#endif /* var_md4_Nettle_MD4_State_defined */
};
#ifdef PIKE_DEBUG
/* Ensure the struct is used in a variable declaration, or else gdb might not see it. */
static struct Nettle_MD4_State_struct *Nettle_MD4_State_gdb_dummy_ptr;
#endif

#undef internal_init_Nettle_MD4_State_defined
#define internal_init_Nettle_MD4_State_defined

#undef Nettle_MD4_State_event_handler_defined
#define Nettle_MD4_State_event_handler_defined
static void init_Nettle_MD4_State_struct(void)
#line 67 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
struct Nettle_Hash_State_struct *instance;
ASSIGN_CURRENT_STORAGE(instance, struct Nettle_Hash_State_struct, 1,
Nettle_Hash_State_program);

werror( "MD4"  ".State->INIT\n");

md4_init(&THIS->md4); 
instance->ctx = &THIS->md4;
}

#ifdef Nettle_MD4_State_event_handler_defined
static void Nettle_MD4_State_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Nettle_MD4_State_defined
  case PROG_EVENT_INIT: init_Nettle_MD4_State_struct(); break;

#endif /* internal_init_Nettle_MD4_State_defined */
  default: break; 
  }
}

#endif /* Nettle_MD4_State_event_handler_defined */
/*! @endclass State
*/


#ifdef Nettle_MD4_event_handler_defined
static void Nettle_MD4_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Nettle_MD4_defined
  case PROG_EVENT_INIT: init_Nettle_MD4_struct(); break;

#endif /* internal_init_Nettle_MD4_defined */
  default: break; 
  }
}

#endif /* Nettle_MD4_event_handler_defined */
/*! @endclass MD4
*/


#line 86 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#line 620 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"






#line 626 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
/* -*- C -*-
 *
 * Cmod header-file acting as a template for the hash classes.
 */

/*! @class MD2
*!
*! Implementation of the MD2 hash algorithm.
*!
*/

#undef class_Nettle_MD2_defined
#define class_Nettle_MD2_defined
DEFAULT_CMOD_STORAGE struct program *Nettle_MD2_program=NULL;

#ifdef Nettle_MD2_program_fun_num_used
DEFAULT_CMOD_STORAGE int Nettle_MD2_program_fun_num=-1;
#endif /* Nettle_MD2_program_fun_num_used */
/*! @decl inherit Hash
*/

#undef inherit_Nettle_Hash_Nettle_MD2_defined
#define inherit_Nettle_Hash_Nettle_MD2_defined
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
static int Nettle_MD2_Nettle_Hash_inh_num = -1;
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
static int Nettle_MD2_Nettle_Hash_inh_offset = -1;

#undef internal_init_Nettle_MD2_defined
#define internal_init_Nettle_MD2_defined

#undef Nettle_MD2_event_handler_defined
#define Nettle_MD2_event_handler_defined
static void init_Nettle_MD2_struct(void)
#line 18 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
struct Nettle_Hash_struct *hash;
ASSIGN_CURRENT_STORAGE(hash, struct Nettle_Hash_struct, 1,
Nettle_Hash_program);

werror( "MD2"  "->INIT\n");

hash->meta = &nettle_md2;
}

/*! @class State
*!
*! State for MD2 hashing.
*!
*/

#undef class_Nettle_MD2_State_defined
#define class_Nettle_MD2_State_defined
DEFAULT_CMOD_STORAGE struct program *Nettle_MD2_State_program=NULL;

#ifdef Nettle_MD2_State_program_fun_num_used
DEFAULT_CMOD_STORAGE int Nettle_MD2_State_program_fun_num=-1;
#endif /* Nettle_MD2_State_program_fun_num_used */
/*! @decl inherit Hash::State
*/


#undef extra_Nettle_MD2_State_defined
#define extra_Nettle_MD2_State_defined

#undef var_md2_Nettle_MD2_State_defined
#define var_md2_Nettle_MD2_State_defined

#undef THIS
#define THIS ((struct Nettle_MD2_State_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef THIS_NETTLE_MD2_STATE
#define THIS_NETTLE_MD2_STATE ((struct Nettle_MD2_State_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef OBJ2_NETTLE_MD2_STATE
#define OBJ2_NETTLE_MD2_STATE(o) ((struct Nettle_MD2_State_struct *)(o->storage+Nettle_MD2_State_storage_offset))

#undef GET_NETTLE_MD2_STATE_STORAGE
#define GET_NETTLE_MD2_STATE_STORAGE(o) ((struct Nettle_MD2_State_struct *)(o->storage+Nettle_MD2_State_storage_offset)
static ptrdiff_t Nettle_MD2_State_storage_offset;
struct Nettle_MD2_State_struct {

#ifdef var_md2_Nettle_MD2_State_defined
#line 64 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
struct md2_ctx md2;
#endif /* var_md2_Nettle_MD2_State_defined */
};
#ifdef PIKE_DEBUG
/* Ensure the struct is used in a variable declaration, or else gdb might not see it. */
static struct Nettle_MD2_State_struct *Nettle_MD2_State_gdb_dummy_ptr;
#endif

#undef internal_init_Nettle_MD2_State_defined
#define internal_init_Nettle_MD2_State_defined

#undef Nettle_MD2_State_event_handler_defined
#define Nettle_MD2_State_event_handler_defined
static void init_Nettle_MD2_State_struct(void)
#line 67 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
struct Nettle_Hash_State_struct *instance;
ASSIGN_CURRENT_STORAGE(instance, struct Nettle_Hash_State_struct, 1,
Nettle_Hash_State_program);

werror( "MD2"  ".State->INIT\n");

md2_init(&THIS->md2); 
instance->ctx = &THIS->md2;
}

#ifdef Nettle_MD2_State_event_handler_defined
static void Nettle_MD2_State_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Nettle_MD2_State_defined
  case PROG_EVENT_INIT: init_Nettle_MD2_State_struct(); break;

#endif /* internal_init_Nettle_MD2_State_defined */
  default: break; 
  }
}

#endif /* Nettle_MD2_State_event_handler_defined */
/*! @endclass State
*/


#ifdef Nettle_MD2_event_handler_defined
static void Nettle_MD2_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Nettle_MD2_defined
  case PROG_EVENT_INIT: init_Nettle_MD2_struct(); break;

#endif /* internal_init_Nettle_MD2_defined */
  default: break; 
  }
}

#endif /* Nettle_MD2_event_handler_defined */
/*! @endclass MD2
*/


#line 86 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#line 626 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"




#line 630 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
#endif /* HAVE_NETTLE_MD4_INIT */



#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
/* -*- C -*-
 *
 * Cmod header-file acting as a template for the hash classes.
 */

/*! @class SHA1
*!
*! Implementation of the SHA1 hash algorithm.
*!
*/

#undef class_Nettle_SHA1_defined
#define class_Nettle_SHA1_defined
DEFAULT_CMOD_STORAGE struct program *Nettle_SHA1_program=NULL;

#ifdef Nettle_SHA1_program_fun_num_used
DEFAULT_CMOD_STORAGE int Nettle_SHA1_program_fun_num=-1;
#endif /* Nettle_SHA1_program_fun_num_used */
/*! @decl inherit Hash
*/

#undef inherit_Nettle_Hash_Nettle_SHA1_defined
#define inherit_Nettle_Hash_Nettle_SHA1_defined
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
static int Nettle_SHA1_Nettle_Hash_inh_num = -1;
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
static int Nettle_SHA1_Nettle_Hash_inh_offset = -1;

#undef internal_init_Nettle_SHA1_defined
#define internal_init_Nettle_SHA1_defined

#undef Nettle_SHA1_event_handler_defined
#define Nettle_SHA1_event_handler_defined
static void init_Nettle_SHA1_struct(void)
#line 18 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
struct Nettle_Hash_struct *hash;
ASSIGN_CURRENT_STORAGE(hash, struct Nettle_Hash_struct, 1,
Nettle_Hash_program);

werror( "SHA1"  "->INIT\n");

hash->meta = &nettle_sha1;
}

/*! @class State
*!
*! State for SHA1 hashing.
*!
*/

#undef class_Nettle_SHA1_State_defined
#define class_Nettle_SHA1_State_defined
DEFAULT_CMOD_STORAGE struct program *Nettle_SHA1_State_program=NULL;

#ifdef Nettle_SHA1_State_program_fun_num_used
DEFAULT_CMOD_STORAGE int Nettle_SHA1_State_program_fun_num=-1;
#endif /* Nettle_SHA1_State_program_fun_num_used */
/*! @decl inherit Hash::State
*/


#undef extra_Nettle_SHA1_State_defined
#define extra_Nettle_SHA1_State_defined

#undef var_sha1_Nettle_SHA1_State_defined
#define var_sha1_Nettle_SHA1_State_defined

#undef THIS
#define THIS ((struct Nettle_SHA1_State_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef THIS_NETTLE_SHA1_STATE
#define THIS_NETTLE_SHA1_STATE ((struct Nettle_SHA1_State_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef OBJ2_NETTLE_SHA1_STATE
#define OBJ2_NETTLE_SHA1_STATE(o) ((struct Nettle_SHA1_State_struct *)(o->storage+Nettle_SHA1_State_storage_offset))

#undef GET_NETTLE_SHA1_STATE_STORAGE
#define GET_NETTLE_SHA1_STATE_STORAGE(o) ((struct Nettle_SHA1_State_struct *)(o->storage+Nettle_SHA1_State_storage_offset)
static ptrdiff_t Nettle_SHA1_State_storage_offset;
struct Nettle_SHA1_State_struct {

#ifdef var_sha1_Nettle_SHA1_State_defined
#line 64 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
struct sha1_ctx sha1;
#endif /* var_sha1_Nettle_SHA1_State_defined */
};
#ifdef PIKE_DEBUG
/* Ensure the struct is used in a variable declaration, or else gdb might not see it. */
static struct Nettle_SHA1_State_struct *Nettle_SHA1_State_gdb_dummy_ptr;
#endif

#undef internal_init_Nettle_SHA1_State_defined
#define internal_init_Nettle_SHA1_State_defined

#undef Nettle_SHA1_State_event_handler_defined
#define Nettle_SHA1_State_event_handler_defined
static void init_Nettle_SHA1_State_struct(void)
#line 67 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
struct Nettle_Hash_State_struct *instance;
ASSIGN_CURRENT_STORAGE(instance, struct Nettle_Hash_State_struct, 1,
Nettle_Hash_State_program);

werror( "SHA1"  ".State->INIT\n");

sha1_init(&THIS->sha1); 
instance->ctx = &THIS->sha1;
}

#ifdef Nettle_SHA1_State_event_handler_defined
static void Nettle_SHA1_State_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Nettle_SHA1_State_defined
  case PROG_EVENT_INIT: init_Nettle_SHA1_State_struct(); break;

#endif /* internal_init_Nettle_SHA1_State_defined */
  default: break; 
  }
}

#endif /* Nettle_SHA1_State_event_handler_defined */
/*! @endclass State
*/


#ifdef Nettle_SHA1_event_handler_defined
static void Nettle_SHA1_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Nettle_SHA1_defined
  case PROG_EVENT_INIT: init_Nettle_SHA1_struct(); break;

#endif /* internal_init_Nettle_SHA1_defined */
  default: break; 
  }
}

#endif /* Nettle_SHA1_event_handler_defined */
/*! @endclass SHA1
*/


#line 86 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#line 634 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"




#line 638 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
#ifdef HAVE_NETTLE_SHA224_INIT



#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
/* -*- C -*-
 *
 * Cmod header-file acting as a template for the hash classes.
 */

/*! @class SHA224
*!
*! Implementation of the SHA224 hash algorithm.
*!
*/

#undef class_Nettle_SHA224_defined
#define class_Nettle_SHA224_defined
DEFAULT_CMOD_STORAGE struct program *Nettle_SHA224_program=NULL;

#ifdef Nettle_SHA224_program_fun_num_used
DEFAULT_CMOD_STORAGE int Nettle_SHA224_program_fun_num=-1;
#endif /* Nettle_SHA224_program_fun_num_used */
/*! @decl inherit Hash
*/

#undef inherit_Nettle_Hash_Nettle_SHA224_defined
#define inherit_Nettle_Hash_Nettle_SHA224_defined
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
static int Nettle_SHA224_Nettle_Hash_inh_num = -1;
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
static int Nettle_SHA224_Nettle_Hash_inh_offset = -1;

#undef internal_init_Nettle_SHA224_defined
#define internal_init_Nettle_SHA224_defined

#undef Nettle_SHA224_event_handler_defined
#define Nettle_SHA224_event_handler_defined
static void init_Nettle_SHA224_struct(void)
#line 18 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
struct Nettle_Hash_struct *hash;
ASSIGN_CURRENT_STORAGE(hash, struct Nettle_Hash_struct, 1,
Nettle_Hash_program);

werror( "SHA224"  "->INIT\n");

hash->meta = &nettle_sha224;
}

/*! @class State
*!
*! State for SHA224 hashing.
*!
*/

#undef class_Nettle_SHA224_State_defined
#define class_Nettle_SHA224_State_defined
DEFAULT_CMOD_STORAGE struct program *Nettle_SHA224_State_program=NULL;

#ifdef Nettle_SHA224_State_program_fun_num_used
DEFAULT_CMOD_STORAGE int Nettle_SHA224_State_program_fun_num=-1;
#endif /* Nettle_SHA224_State_program_fun_num_used */
/*! @decl inherit Hash::State
*/


#undef extra_Nettle_SHA224_State_defined
#define extra_Nettle_SHA224_State_defined

#undef var_sha224_Nettle_SHA224_State_defined
#define var_sha224_Nettle_SHA224_State_defined

#undef THIS
#define THIS ((struct Nettle_SHA224_State_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef THIS_NETTLE_SHA224_STATE
#define THIS_NETTLE_SHA224_STATE ((struct Nettle_SHA224_State_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef OBJ2_NETTLE_SHA224_STATE
#define OBJ2_NETTLE_SHA224_STATE(o) ((struct Nettle_SHA224_State_struct *)(o->storage+Nettle_SHA224_State_storage_offset))

#undef GET_NETTLE_SHA224_STATE_STORAGE
#define GET_NETTLE_SHA224_STATE_STORAGE(o) ((struct Nettle_SHA224_State_struct *)(o->storage+Nettle_SHA224_State_storage_offset)
static ptrdiff_t Nettle_SHA224_State_storage_offset;
struct Nettle_SHA224_State_struct {

#ifdef var_sha224_Nettle_SHA224_State_defined
#line 64 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
struct sha224_ctx sha224;
#endif /* var_sha224_Nettle_SHA224_State_defined */
};
#ifdef PIKE_DEBUG
/* Ensure the struct is used in a variable declaration, or else gdb might not see it. */
static struct Nettle_SHA224_State_struct *Nettle_SHA224_State_gdb_dummy_ptr;
#endif

#undef internal_init_Nettle_SHA224_State_defined
#define internal_init_Nettle_SHA224_State_defined

#undef Nettle_SHA224_State_event_handler_defined
#define Nettle_SHA224_State_event_handler_defined
static void init_Nettle_SHA224_State_struct(void)
#line 67 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
struct Nettle_Hash_State_struct *instance;
ASSIGN_CURRENT_STORAGE(instance, struct Nettle_Hash_State_struct, 1,
Nettle_Hash_State_program);

werror( "SHA224"  ".State->INIT\n");

sha224_init(&THIS->sha224); 
instance->ctx = &THIS->sha224;
}

#ifdef Nettle_SHA224_State_event_handler_defined
static void Nettle_SHA224_State_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Nettle_SHA224_State_defined
  case PROG_EVENT_INIT: init_Nettle_SHA224_State_struct(); break;

#endif /* internal_init_Nettle_SHA224_State_defined */
  default: break; 
  }
}

#endif /* Nettle_SHA224_State_event_handler_defined */
/*! @endclass State
*/


#ifdef Nettle_SHA224_event_handler_defined
static void Nettle_SHA224_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Nettle_SHA224_defined
  case PROG_EVENT_INIT: init_Nettle_SHA224_struct(); break;

#endif /* internal_init_Nettle_SHA224_defined */
  default: break; 
  }
}

#endif /* Nettle_SHA224_event_handler_defined */
/*! @endclass SHA224
*/


#line 86 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#line 642 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"




#line 646 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
#endif



#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
/* -*- C -*-
 *
 * Cmod header-file acting as a template for the hash classes.
 */

/*! @class SHA256
*!
*! Implementation of the SHA256 hash algorithm.
*!
*/

#undef class_Nettle_SHA256_defined
#define class_Nettle_SHA256_defined
DEFAULT_CMOD_STORAGE struct program *Nettle_SHA256_program=NULL;

#ifdef Nettle_SHA256_program_fun_num_used
DEFAULT_CMOD_STORAGE int Nettle_SHA256_program_fun_num=-1;
#endif /* Nettle_SHA256_program_fun_num_used */
/*! @decl inherit Hash
*/

#undef inherit_Nettle_Hash_Nettle_SHA256_defined
#define inherit_Nettle_Hash_Nettle_SHA256_defined
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
static int Nettle_SHA256_Nettle_Hash_inh_num = -1;
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
static int Nettle_SHA256_Nettle_Hash_inh_offset = -1;

#undef internal_init_Nettle_SHA256_defined
#define internal_init_Nettle_SHA256_defined

#undef Nettle_SHA256_event_handler_defined
#define Nettle_SHA256_event_handler_defined
static void init_Nettle_SHA256_struct(void)
#line 18 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
struct Nettle_Hash_struct *hash;
ASSIGN_CURRENT_STORAGE(hash, struct Nettle_Hash_struct, 1,
Nettle_Hash_program);

werror( "SHA256"  "->INIT\n");

hash->meta = &nettle_sha256;
}

/*! @class State
*!
*! State for SHA256 hashing.
*!
*/

#undef class_Nettle_SHA256_State_defined
#define class_Nettle_SHA256_State_defined
DEFAULT_CMOD_STORAGE struct program *Nettle_SHA256_State_program=NULL;

#ifdef Nettle_SHA256_State_program_fun_num_used
DEFAULT_CMOD_STORAGE int Nettle_SHA256_State_program_fun_num=-1;
#endif /* Nettle_SHA256_State_program_fun_num_used */
/*! @decl inherit Hash::State
*/


#undef extra_Nettle_SHA256_State_defined
#define extra_Nettle_SHA256_State_defined

#undef var_sha256_Nettle_SHA256_State_defined
#define var_sha256_Nettle_SHA256_State_defined

#undef THIS
#define THIS ((struct Nettle_SHA256_State_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef THIS_NETTLE_SHA256_STATE
#define THIS_NETTLE_SHA256_STATE ((struct Nettle_SHA256_State_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef OBJ2_NETTLE_SHA256_STATE
#define OBJ2_NETTLE_SHA256_STATE(o) ((struct Nettle_SHA256_State_struct *)(o->storage+Nettle_SHA256_State_storage_offset))

#undef GET_NETTLE_SHA256_STATE_STORAGE
#define GET_NETTLE_SHA256_STATE_STORAGE(o) ((struct Nettle_SHA256_State_struct *)(o->storage+Nettle_SHA256_State_storage_offset)
static ptrdiff_t Nettle_SHA256_State_storage_offset;
struct Nettle_SHA256_State_struct {

#ifdef var_sha256_Nettle_SHA256_State_defined
#line 64 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
struct sha256_ctx sha256;
#endif /* var_sha256_Nettle_SHA256_State_defined */
};
#ifdef PIKE_DEBUG
/* Ensure the struct is used in a variable declaration, or else gdb might not see it. */
static struct Nettle_SHA256_State_struct *Nettle_SHA256_State_gdb_dummy_ptr;
#endif

#undef internal_init_Nettle_SHA256_State_defined
#define internal_init_Nettle_SHA256_State_defined

#undef Nettle_SHA256_State_event_handler_defined
#define Nettle_SHA256_State_event_handler_defined
static void init_Nettle_SHA256_State_struct(void)
#line 67 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
struct Nettle_Hash_State_struct *instance;
ASSIGN_CURRENT_STORAGE(instance, struct Nettle_Hash_State_struct, 1,
Nettle_Hash_State_program);

werror( "SHA256"  ".State->INIT\n");

sha256_init(&THIS->sha256); 
instance->ctx = &THIS->sha256;
}

#ifdef Nettle_SHA256_State_event_handler_defined
static void Nettle_SHA256_State_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Nettle_SHA256_State_defined
  case PROG_EVENT_INIT: init_Nettle_SHA256_State_struct(); break;

#endif /* internal_init_Nettle_SHA256_State_defined */
  default: break; 
  }
}

#endif /* Nettle_SHA256_State_event_handler_defined */
/*! @endclass State
*/


#ifdef Nettle_SHA256_event_handler_defined
static void Nettle_SHA256_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Nettle_SHA256_defined
  case PROG_EVENT_INIT: init_Nettle_SHA256_struct(); break;

#endif /* internal_init_Nettle_SHA256_defined */
  default: break; 
  }
}

#endif /* Nettle_SHA256_event_handler_defined */
/*! @endclass SHA256
*/


#line 86 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#line 650 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"




#line 654 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
#ifdef SHA384_DIGEST_SIZE



#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
/* -*- C -*-
 *
 * Cmod header-file acting as a template for the hash classes.
 */

/*! @class SHA384
*!
*! Implementation of the SHA384 hash algorithm.
*!
*/

#undef class_Nettle_SHA384_defined
#define class_Nettle_SHA384_defined
DEFAULT_CMOD_STORAGE struct program *Nettle_SHA384_program=NULL;

#ifdef Nettle_SHA384_program_fun_num_used
DEFAULT_CMOD_STORAGE int Nettle_SHA384_program_fun_num=-1;
#endif /* Nettle_SHA384_program_fun_num_used */
/*! @decl inherit Hash
*/

#undef inherit_Nettle_Hash_Nettle_SHA384_defined
#define inherit_Nettle_Hash_Nettle_SHA384_defined
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
static int Nettle_SHA384_Nettle_Hash_inh_num = -1;
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
static int Nettle_SHA384_Nettle_Hash_inh_offset = -1;

#undef internal_init_Nettle_SHA384_defined
#define internal_init_Nettle_SHA384_defined

#undef Nettle_SHA384_event_handler_defined
#define Nettle_SHA384_event_handler_defined
static void init_Nettle_SHA384_struct(void)
#line 18 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
struct Nettle_Hash_struct *hash;
ASSIGN_CURRENT_STORAGE(hash, struct Nettle_Hash_struct, 1,
Nettle_Hash_program);

werror( "SHA384"  "->INIT\n");

hash->meta = &nettle_sha384;
}

/*! @class State
*!
*! State for SHA384 hashing.
*!
*/

#undef class_Nettle_SHA384_State_defined
#define class_Nettle_SHA384_State_defined
DEFAULT_CMOD_STORAGE struct program *Nettle_SHA384_State_program=NULL;

#ifdef Nettle_SHA384_State_program_fun_num_used
DEFAULT_CMOD_STORAGE int Nettle_SHA384_State_program_fun_num=-1;
#endif /* Nettle_SHA384_State_program_fun_num_used */
/*! @decl inherit Hash::State
*/


#undef extra_Nettle_SHA384_State_defined
#define extra_Nettle_SHA384_State_defined

#undef var_sha384_Nettle_SHA384_State_defined
#define var_sha384_Nettle_SHA384_State_defined

#undef THIS
#define THIS ((struct Nettle_SHA384_State_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef THIS_NETTLE_SHA384_STATE
#define THIS_NETTLE_SHA384_STATE ((struct Nettle_SHA384_State_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef OBJ2_NETTLE_SHA384_STATE
#define OBJ2_NETTLE_SHA384_STATE(o) ((struct Nettle_SHA384_State_struct *)(o->storage+Nettle_SHA384_State_storage_offset))

#undef GET_NETTLE_SHA384_STATE_STORAGE
#define GET_NETTLE_SHA384_STATE_STORAGE(o) ((struct Nettle_SHA384_State_struct *)(o->storage+Nettle_SHA384_State_storage_offset)
static ptrdiff_t Nettle_SHA384_State_storage_offset;
struct Nettle_SHA384_State_struct {

#ifdef var_sha384_Nettle_SHA384_State_defined
#line 64 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
struct sha384_ctx sha384;
#endif /* var_sha384_Nettle_SHA384_State_defined */
};
#ifdef PIKE_DEBUG
/* Ensure the struct is used in a variable declaration, or else gdb might not see it. */
static struct Nettle_SHA384_State_struct *Nettle_SHA384_State_gdb_dummy_ptr;
#endif

#undef internal_init_Nettle_SHA384_State_defined
#define internal_init_Nettle_SHA384_State_defined

#undef Nettle_SHA384_State_event_handler_defined
#define Nettle_SHA384_State_event_handler_defined
static void init_Nettle_SHA384_State_struct(void)
#line 67 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
struct Nettle_Hash_State_struct *instance;
ASSIGN_CURRENT_STORAGE(instance, struct Nettle_Hash_State_struct, 1,
Nettle_Hash_State_program);

werror( "SHA384"  ".State->INIT\n");

sha384_init(&THIS->sha384); 
instance->ctx = &THIS->sha384;
}

#ifdef Nettle_SHA384_State_event_handler_defined
static void Nettle_SHA384_State_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Nettle_SHA384_State_defined
  case PROG_EVENT_INIT: init_Nettle_SHA384_State_struct(); break;

#endif /* internal_init_Nettle_SHA384_State_defined */
  default: break; 
  }
}

#endif /* Nettle_SHA384_State_event_handler_defined */
/*! @endclass State
*/


#ifdef Nettle_SHA384_event_handler_defined
static void Nettle_SHA384_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Nettle_SHA384_defined
  case PROG_EVENT_INIT: init_Nettle_SHA384_struct(); break;

#endif /* internal_init_Nettle_SHA384_defined */
  default: break; 
  }
}

#endif /* Nettle_SHA384_event_handler_defined */
/*! @endclass SHA384
*/


#line 86 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#line 658 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"




#line 662 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
#endif /* SHA384_DIGEST_SIZE */

#ifdef SHA512_DIGEST_SIZE



#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
/* -*- C -*-
 *
 * Cmod header-file acting as a template for the hash classes.
 */

/*! @class SHA512
*!
*! Implementation of the SHA512 hash algorithm.
*!
*/

#undef class_Nettle_SHA512_defined
#define class_Nettle_SHA512_defined
DEFAULT_CMOD_STORAGE struct program *Nettle_SHA512_program=NULL;

#ifdef Nettle_SHA512_program_fun_num_used
DEFAULT_CMOD_STORAGE int Nettle_SHA512_program_fun_num=-1;
#endif /* Nettle_SHA512_program_fun_num_used */
/*! @decl inherit Hash
*/

#undef inherit_Nettle_Hash_Nettle_SHA512_defined
#define inherit_Nettle_Hash_Nettle_SHA512_defined
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
static int Nettle_SHA512_Nettle_Hash_inh_num = -1;
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
static int Nettle_SHA512_Nettle_Hash_inh_offset = -1;

#undef internal_init_Nettle_SHA512_defined
#define internal_init_Nettle_SHA512_defined

#undef Nettle_SHA512_event_handler_defined
#define Nettle_SHA512_event_handler_defined
static void init_Nettle_SHA512_struct(void)
#line 18 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
struct Nettle_Hash_struct *hash;
ASSIGN_CURRENT_STORAGE(hash, struct Nettle_Hash_struct, 1,
Nettle_Hash_program);

werror( "SHA512"  "->INIT\n");

hash->meta = &nettle_sha512;
}

/*! @class State
*!
*! State for SHA512 hashing.
*!
*/

#undef class_Nettle_SHA512_State_defined
#define class_Nettle_SHA512_State_defined
DEFAULT_CMOD_STORAGE struct program *Nettle_SHA512_State_program=NULL;

#ifdef Nettle_SHA512_State_program_fun_num_used
DEFAULT_CMOD_STORAGE int Nettle_SHA512_State_program_fun_num=-1;
#endif /* Nettle_SHA512_State_program_fun_num_used */
/*! @decl inherit Hash::State
*/


#undef extra_Nettle_SHA512_State_defined
#define extra_Nettle_SHA512_State_defined

#undef var_sha512_Nettle_SHA512_State_defined
#define var_sha512_Nettle_SHA512_State_defined

#undef THIS
#define THIS ((struct Nettle_SHA512_State_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef THIS_NETTLE_SHA512_STATE
#define THIS_NETTLE_SHA512_STATE ((struct Nettle_SHA512_State_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef OBJ2_NETTLE_SHA512_STATE
#define OBJ2_NETTLE_SHA512_STATE(o) ((struct Nettle_SHA512_State_struct *)(o->storage+Nettle_SHA512_State_storage_offset))

#undef GET_NETTLE_SHA512_STATE_STORAGE
#define GET_NETTLE_SHA512_STATE_STORAGE(o) ((struct Nettle_SHA512_State_struct *)(o->storage+Nettle_SHA512_State_storage_offset)
static ptrdiff_t Nettle_SHA512_State_storage_offset;
struct Nettle_SHA512_State_struct {

#ifdef var_sha512_Nettle_SHA512_State_defined
#line 64 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
struct sha512_ctx sha512;
#endif /* var_sha512_Nettle_SHA512_State_defined */
};
#ifdef PIKE_DEBUG
/* Ensure the struct is used in a variable declaration, or else gdb might not see it. */
static struct Nettle_SHA512_State_struct *Nettle_SHA512_State_gdb_dummy_ptr;
#endif

#undef internal_init_Nettle_SHA512_State_defined
#define internal_init_Nettle_SHA512_State_defined

#undef Nettle_SHA512_State_event_handler_defined
#define Nettle_SHA512_State_event_handler_defined
static void init_Nettle_SHA512_State_struct(void)
#line 67 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
struct Nettle_Hash_State_struct *instance;
ASSIGN_CURRENT_STORAGE(instance, struct Nettle_Hash_State_struct, 1,
Nettle_Hash_State_program);

werror( "SHA512"  ".State->INIT\n");

sha512_init(&THIS->sha512); 
instance->ctx = &THIS->sha512;
}

#ifdef Nettle_SHA512_State_event_handler_defined
static void Nettle_SHA512_State_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Nettle_SHA512_State_defined
  case PROG_EVENT_INIT: init_Nettle_SHA512_State_struct(); break;

#endif /* internal_init_Nettle_SHA512_State_defined */
  default: break; 
  }
}

#endif /* Nettle_SHA512_State_event_handler_defined */
/*! @endclass State
*/


#ifdef Nettle_SHA512_event_handler_defined
static void Nettle_SHA512_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Nettle_SHA512_defined
  case PROG_EVENT_INIT: init_Nettle_SHA512_struct(); break;

#endif /* internal_init_Nettle_SHA512_defined */
  default: break; 
  }
}

#endif /* Nettle_SHA512_event_handler_defined */
/*! @endclass SHA512
*/


#line 86 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#line 668 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"




#line 672 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
#endif /* SHA512_DIGEST_SIZE */

/* NB: SHA3 in Nettle 3.2 and later does not interoperate
 *     with earlier versions of Nettle.
 */
#if defined(HAVE_NETTLE_SHA3_H) && defined(NETTLE_SHA3_FIPS202)



#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
/* -*- C -*-
 *
 * Cmod header-file acting as a template for the hash classes.
 */

/*! @class SHA3_224
*!
*! Implementation of the SHA3_224 hash algorithm.
*!
*/

#undef class_Nettle_SHA3_224_defined
#define class_Nettle_SHA3_224_defined
DEFAULT_CMOD_STORAGE struct program *Nettle_SHA3_224_program=NULL;

#ifdef Nettle_SHA3_224_program_fun_num_used
DEFAULT_CMOD_STORAGE int Nettle_SHA3_224_program_fun_num=-1;
#endif /* Nettle_SHA3_224_program_fun_num_used */
/*! @decl inherit Hash
*/

#undef inherit_Nettle_Hash_Nettle_SHA3_224_defined
#define inherit_Nettle_Hash_Nettle_SHA3_224_defined
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
static int Nettle_SHA3_224_Nettle_Hash_inh_num = -1;
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
static int Nettle_SHA3_224_Nettle_Hash_inh_offset = -1;

#undef internal_init_Nettle_SHA3_224_defined
#define internal_init_Nettle_SHA3_224_defined

#undef Nettle_SHA3_224_event_handler_defined
#define Nettle_SHA3_224_event_handler_defined
static void init_Nettle_SHA3_224_struct(void)
#line 18 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
struct Nettle_Hash_struct *hash;
ASSIGN_CURRENT_STORAGE(hash, struct Nettle_Hash_struct, 1,
Nettle_Hash_program);

werror( "SHA3_224"  "->INIT\n");

hash->meta = &nettle_sha3_224;
}

/*! @class State
*!
*! State for SHA3_224 hashing.
*!
*/

#undef class_Nettle_SHA3_224_State_defined
#define class_Nettle_SHA3_224_State_defined
DEFAULT_CMOD_STORAGE struct program *Nettle_SHA3_224_State_program=NULL;

#ifdef Nettle_SHA3_224_State_program_fun_num_used
DEFAULT_CMOD_STORAGE int Nettle_SHA3_224_State_program_fun_num=-1;
#endif /* Nettle_SHA3_224_State_program_fun_num_used */
/*! @decl inherit Hash::State
*/


#undef extra_Nettle_SHA3_224_State_defined
#define extra_Nettle_SHA3_224_State_defined

#undef var_sha3_224_Nettle_SHA3_224_State_defined
#define var_sha3_224_Nettle_SHA3_224_State_defined

#undef THIS
#define THIS ((struct Nettle_SHA3_224_State_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef THIS_NETTLE_SHA3_224_STATE
#define THIS_NETTLE_SHA3_224_STATE ((struct Nettle_SHA3_224_State_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef OBJ2_NETTLE_SHA3_224_STATE
#define OBJ2_NETTLE_SHA3_224_STATE(o) ((struct Nettle_SHA3_224_State_struct *)(o->storage+Nettle_SHA3_224_State_storage_offset))

#undef GET_NETTLE_SHA3_224_STATE_STORAGE
#define GET_NETTLE_SHA3_224_STATE_STORAGE(o) ((struct Nettle_SHA3_224_State_struct *)(o->storage+Nettle_SHA3_224_State_storage_offset)
static ptrdiff_t Nettle_SHA3_224_State_storage_offset;
struct Nettle_SHA3_224_State_struct {

#ifdef var_sha3_224_Nettle_SHA3_224_State_defined
#line 64 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
struct sha3_224_ctx sha3_224;
#endif /* var_sha3_224_Nettle_SHA3_224_State_defined */
};
#ifdef PIKE_DEBUG
/* Ensure the struct is used in a variable declaration, or else gdb might not see it. */
static struct Nettle_SHA3_224_State_struct *Nettle_SHA3_224_State_gdb_dummy_ptr;
#endif

#undef internal_init_Nettle_SHA3_224_State_defined
#define internal_init_Nettle_SHA3_224_State_defined

#undef Nettle_SHA3_224_State_event_handler_defined
#define Nettle_SHA3_224_State_event_handler_defined
static void init_Nettle_SHA3_224_State_struct(void)
#line 67 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
struct Nettle_Hash_State_struct *instance;
ASSIGN_CURRENT_STORAGE(instance, struct Nettle_Hash_State_struct, 1,
Nettle_Hash_State_program);

werror( "SHA3_224"  ".State->INIT\n");

sha3_224_init(&THIS->sha3_224); 
instance->ctx = &THIS->sha3_224;
}

#ifdef Nettle_SHA3_224_State_event_handler_defined
static void Nettle_SHA3_224_State_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Nettle_SHA3_224_State_defined
  case PROG_EVENT_INIT: init_Nettle_SHA3_224_State_struct(); break;

#endif /* internal_init_Nettle_SHA3_224_State_defined */
  default: break; 
  }
}

#endif /* Nettle_SHA3_224_State_event_handler_defined */
/*! @endclass State
*/


#ifdef Nettle_SHA3_224_event_handler_defined
static void Nettle_SHA3_224_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Nettle_SHA3_224_defined
  case PROG_EVENT_INIT: init_Nettle_SHA3_224_struct(); break;

#endif /* internal_init_Nettle_SHA3_224_defined */
  default: break; 
  }
}

#endif /* Nettle_SHA3_224_event_handler_defined */
/*! @endclass SHA3_224
*/


#line 86 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#line 681 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"






#line 687 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
/* -*- C -*-
 *
 * Cmod header-file acting as a template for the hash classes.
 */

/*! @class SHA3_256
*!
*! Implementation of the SHA3_256 hash algorithm.
*!
*/

#undef class_Nettle_SHA3_256_defined
#define class_Nettle_SHA3_256_defined
DEFAULT_CMOD_STORAGE struct program *Nettle_SHA3_256_program=NULL;

#ifdef Nettle_SHA3_256_program_fun_num_used
DEFAULT_CMOD_STORAGE int Nettle_SHA3_256_program_fun_num=-1;
#endif /* Nettle_SHA3_256_program_fun_num_used */
/*! @decl inherit Hash
*/

#undef inherit_Nettle_Hash_Nettle_SHA3_256_defined
#define inherit_Nettle_Hash_Nettle_SHA3_256_defined
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
static int Nettle_SHA3_256_Nettle_Hash_inh_num = -1;
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
static int Nettle_SHA3_256_Nettle_Hash_inh_offset = -1;

#undef internal_init_Nettle_SHA3_256_defined
#define internal_init_Nettle_SHA3_256_defined

#undef Nettle_SHA3_256_event_handler_defined
#define Nettle_SHA3_256_event_handler_defined
static void init_Nettle_SHA3_256_struct(void)
#line 18 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
struct Nettle_Hash_struct *hash;
ASSIGN_CURRENT_STORAGE(hash, struct Nettle_Hash_struct, 1,
Nettle_Hash_program);

werror( "SHA3_256"  "->INIT\n");

hash->meta = &nettle_sha3_256;
}

/*! @class State
*!
*! State for SHA3_256 hashing.
*!
*/

#undef class_Nettle_SHA3_256_State_defined
#define class_Nettle_SHA3_256_State_defined
DEFAULT_CMOD_STORAGE struct program *Nettle_SHA3_256_State_program=NULL;

#ifdef Nettle_SHA3_256_State_program_fun_num_used
DEFAULT_CMOD_STORAGE int Nettle_SHA3_256_State_program_fun_num=-1;
#endif /* Nettle_SHA3_256_State_program_fun_num_used */
/*! @decl inherit Hash::State
*/


#undef extra_Nettle_SHA3_256_State_defined
#define extra_Nettle_SHA3_256_State_defined

#undef var_sha3_256_Nettle_SHA3_256_State_defined
#define var_sha3_256_Nettle_SHA3_256_State_defined

#undef THIS
#define THIS ((struct Nettle_SHA3_256_State_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef THIS_NETTLE_SHA3_256_STATE
#define THIS_NETTLE_SHA3_256_STATE ((struct Nettle_SHA3_256_State_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef OBJ2_NETTLE_SHA3_256_STATE
#define OBJ2_NETTLE_SHA3_256_STATE(o) ((struct Nettle_SHA3_256_State_struct *)(o->storage+Nettle_SHA3_256_State_storage_offset))

#undef GET_NETTLE_SHA3_256_STATE_STORAGE
#define GET_NETTLE_SHA3_256_STATE_STORAGE(o) ((struct Nettle_SHA3_256_State_struct *)(o->storage+Nettle_SHA3_256_State_storage_offset)
static ptrdiff_t Nettle_SHA3_256_State_storage_offset;
struct Nettle_SHA3_256_State_struct {

#ifdef var_sha3_256_Nettle_SHA3_256_State_defined
#line 64 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
struct sha3_256_ctx sha3_256;
#endif /* var_sha3_256_Nettle_SHA3_256_State_defined */
};
#ifdef PIKE_DEBUG
/* Ensure the struct is used in a variable declaration, or else gdb might not see it. */
static struct Nettle_SHA3_256_State_struct *Nettle_SHA3_256_State_gdb_dummy_ptr;
#endif

#undef internal_init_Nettle_SHA3_256_State_defined
#define internal_init_Nettle_SHA3_256_State_defined

#undef Nettle_SHA3_256_State_event_handler_defined
#define Nettle_SHA3_256_State_event_handler_defined
static void init_Nettle_SHA3_256_State_struct(void)
#line 67 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
struct Nettle_Hash_State_struct *instance;
ASSIGN_CURRENT_STORAGE(instance, struct Nettle_Hash_State_struct, 1,
Nettle_Hash_State_program);

werror( "SHA3_256"  ".State->INIT\n");

sha3_256_init(&THIS->sha3_256); 
instance->ctx = &THIS->sha3_256;
}

#ifdef Nettle_SHA3_256_State_event_handler_defined
static void Nettle_SHA3_256_State_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Nettle_SHA3_256_State_defined
  case PROG_EVENT_INIT: init_Nettle_SHA3_256_State_struct(); break;

#endif /* internal_init_Nettle_SHA3_256_State_defined */
  default: break; 
  }
}

#endif /* Nettle_SHA3_256_State_event_handler_defined */
/*! @endclass State
*/


#ifdef Nettle_SHA3_256_event_handler_defined
static void Nettle_SHA3_256_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Nettle_SHA3_256_defined
  case PROG_EVENT_INIT: init_Nettle_SHA3_256_struct(); break;

#endif /* internal_init_Nettle_SHA3_256_defined */
  default: break; 
  }
}

#endif /* Nettle_SHA3_256_event_handler_defined */
/*! @endclass SHA3_256
*/


#line 86 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#line 687 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"






#line 693 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
/* -*- C -*-
 *
 * Cmod header-file acting as a template for the hash classes.
 */

/*! @class SHA3_384
*!
*! Implementation of the SHA3_384 hash algorithm.
*!
*/

#undef class_Nettle_SHA3_384_defined
#define class_Nettle_SHA3_384_defined
DEFAULT_CMOD_STORAGE struct program *Nettle_SHA3_384_program=NULL;

#ifdef Nettle_SHA3_384_program_fun_num_used
DEFAULT_CMOD_STORAGE int Nettle_SHA3_384_program_fun_num=-1;
#endif /* Nettle_SHA3_384_program_fun_num_used */
/*! @decl inherit Hash
*/

#undef inherit_Nettle_Hash_Nettle_SHA3_384_defined
#define inherit_Nettle_Hash_Nettle_SHA3_384_defined
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
static int Nettle_SHA3_384_Nettle_Hash_inh_num = -1;
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
static int Nettle_SHA3_384_Nettle_Hash_inh_offset = -1;

#undef internal_init_Nettle_SHA3_384_defined
#define internal_init_Nettle_SHA3_384_defined

#undef Nettle_SHA3_384_event_handler_defined
#define Nettle_SHA3_384_event_handler_defined
static void init_Nettle_SHA3_384_struct(void)
#line 18 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
struct Nettle_Hash_struct *hash;
ASSIGN_CURRENT_STORAGE(hash, struct Nettle_Hash_struct, 1,
Nettle_Hash_program);

werror( "SHA3_384"  "->INIT\n");

hash->meta = &nettle_sha3_384;
}

/*! @class State
*!
*! State for SHA3_384 hashing.
*!
*/

#undef class_Nettle_SHA3_384_State_defined
#define class_Nettle_SHA3_384_State_defined
DEFAULT_CMOD_STORAGE struct program *Nettle_SHA3_384_State_program=NULL;

#ifdef Nettle_SHA3_384_State_program_fun_num_used
DEFAULT_CMOD_STORAGE int Nettle_SHA3_384_State_program_fun_num=-1;
#endif /* Nettle_SHA3_384_State_program_fun_num_used */
/*! @decl inherit Hash::State
*/


#undef extra_Nettle_SHA3_384_State_defined
#define extra_Nettle_SHA3_384_State_defined

#undef var_sha3_384_Nettle_SHA3_384_State_defined
#define var_sha3_384_Nettle_SHA3_384_State_defined

#undef THIS
#define THIS ((struct Nettle_SHA3_384_State_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef THIS_NETTLE_SHA3_384_STATE
#define THIS_NETTLE_SHA3_384_STATE ((struct Nettle_SHA3_384_State_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef OBJ2_NETTLE_SHA3_384_STATE
#define OBJ2_NETTLE_SHA3_384_STATE(o) ((struct Nettle_SHA3_384_State_struct *)(o->storage+Nettle_SHA3_384_State_storage_offset))

#undef GET_NETTLE_SHA3_384_STATE_STORAGE
#define GET_NETTLE_SHA3_384_STATE_STORAGE(o) ((struct Nettle_SHA3_384_State_struct *)(o->storage+Nettle_SHA3_384_State_storage_offset)
static ptrdiff_t Nettle_SHA3_384_State_storage_offset;
struct Nettle_SHA3_384_State_struct {

#ifdef var_sha3_384_Nettle_SHA3_384_State_defined
#line 64 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
struct sha3_384_ctx sha3_384;
#endif /* var_sha3_384_Nettle_SHA3_384_State_defined */
};
#ifdef PIKE_DEBUG
/* Ensure the struct is used in a variable declaration, or else gdb might not see it. */
static struct Nettle_SHA3_384_State_struct *Nettle_SHA3_384_State_gdb_dummy_ptr;
#endif

#undef internal_init_Nettle_SHA3_384_State_defined
#define internal_init_Nettle_SHA3_384_State_defined

#undef Nettle_SHA3_384_State_event_handler_defined
#define Nettle_SHA3_384_State_event_handler_defined
static void init_Nettle_SHA3_384_State_struct(void)
#line 67 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
struct Nettle_Hash_State_struct *instance;
ASSIGN_CURRENT_STORAGE(instance, struct Nettle_Hash_State_struct, 1,
Nettle_Hash_State_program);

werror( "SHA3_384"  ".State->INIT\n");

sha3_384_init(&THIS->sha3_384); 
instance->ctx = &THIS->sha3_384;
}

#ifdef Nettle_SHA3_384_State_event_handler_defined
static void Nettle_SHA3_384_State_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Nettle_SHA3_384_State_defined
  case PROG_EVENT_INIT: init_Nettle_SHA3_384_State_struct(); break;

#endif /* internal_init_Nettle_SHA3_384_State_defined */
  default: break; 
  }
}

#endif /* Nettle_SHA3_384_State_event_handler_defined */
/*! @endclass State
*/


#ifdef Nettle_SHA3_384_event_handler_defined
static void Nettle_SHA3_384_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Nettle_SHA3_384_defined
  case PROG_EVENT_INIT: init_Nettle_SHA3_384_struct(); break;

#endif /* internal_init_Nettle_SHA3_384_defined */
  default: break; 
  }
}

#endif /* Nettle_SHA3_384_event_handler_defined */
/*! @endclass SHA3_384
*/


#line 86 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#line 693 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"






#line 699 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
/* -*- C -*-
 *
 * Cmod header-file acting as a template for the hash classes.
 */

/*! @class SHA3_512
*!
*! Implementation of the SHA3_512 hash algorithm.
*!
*/

#undef class_Nettle_SHA3_512_defined
#define class_Nettle_SHA3_512_defined
DEFAULT_CMOD_STORAGE struct program *Nettle_SHA3_512_program=NULL;

#ifdef Nettle_SHA3_512_program_fun_num_used
DEFAULT_CMOD_STORAGE int Nettle_SHA3_512_program_fun_num=-1;
#endif /* Nettle_SHA3_512_program_fun_num_used */
/*! @decl inherit Hash
*/

#undef inherit_Nettle_Hash_Nettle_SHA3_512_defined
#define inherit_Nettle_Hash_Nettle_SHA3_512_defined
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
static int Nettle_SHA3_512_Nettle_Hash_inh_num = -1;
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
static int Nettle_SHA3_512_Nettle_Hash_inh_offset = -1;

#undef internal_init_Nettle_SHA3_512_defined
#define internal_init_Nettle_SHA3_512_defined

#undef Nettle_SHA3_512_event_handler_defined
#define Nettle_SHA3_512_event_handler_defined
static void init_Nettle_SHA3_512_struct(void)
#line 18 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
struct Nettle_Hash_struct *hash;
ASSIGN_CURRENT_STORAGE(hash, struct Nettle_Hash_struct, 1,
Nettle_Hash_program);

werror( "SHA3_512"  "->INIT\n");

hash->meta = &nettle_sha3_512;
}

/*! @class State
*!
*! State for SHA3_512 hashing.
*!
*/

#undef class_Nettle_SHA3_512_State_defined
#define class_Nettle_SHA3_512_State_defined
DEFAULT_CMOD_STORAGE struct program *Nettle_SHA3_512_State_program=NULL;

#ifdef Nettle_SHA3_512_State_program_fun_num_used
DEFAULT_CMOD_STORAGE int Nettle_SHA3_512_State_program_fun_num=-1;
#endif /* Nettle_SHA3_512_State_program_fun_num_used */
/*! @decl inherit Hash::State
*/


#undef extra_Nettle_SHA3_512_State_defined
#define extra_Nettle_SHA3_512_State_defined

#undef var_sha3_512_Nettle_SHA3_512_State_defined
#define var_sha3_512_Nettle_SHA3_512_State_defined

#undef THIS
#define THIS ((struct Nettle_SHA3_512_State_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef THIS_NETTLE_SHA3_512_STATE
#define THIS_NETTLE_SHA3_512_STATE ((struct Nettle_SHA3_512_State_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef OBJ2_NETTLE_SHA3_512_STATE
#define OBJ2_NETTLE_SHA3_512_STATE(o) ((struct Nettle_SHA3_512_State_struct *)(o->storage+Nettle_SHA3_512_State_storage_offset))

#undef GET_NETTLE_SHA3_512_STATE_STORAGE
#define GET_NETTLE_SHA3_512_STATE_STORAGE(o) ((struct Nettle_SHA3_512_State_struct *)(o->storage+Nettle_SHA3_512_State_storage_offset)
static ptrdiff_t Nettle_SHA3_512_State_storage_offset;
struct Nettle_SHA3_512_State_struct {

#ifdef var_sha3_512_Nettle_SHA3_512_State_defined
#line 64 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
struct sha3_512_ctx sha3_512;
#endif /* var_sha3_512_Nettle_SHA3_512_State_defined */
};
#ifdef PIKE_DEBUG
/* Ensure the struct is used in a variable declaration, or else gdb might not see it. */
static struct Nettle_SHA3_512_State_struct *Nettle_SHA3_512_State_gdb_dummy_ptr;
#endif

#undef internal_init_Nettle_SHA3_512_State_defined
#define internal_init_Nettle_SHA3_512_State_defined

#undef Nettle_SHA3_512_State_event_handler_defined
#define Nettle_SHA3_512_State_event_handler_defined
static void init_Nettle_SHA3_512_State_struct(void)
#line 67 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
struct Nettle_Hash_State_struct *instance;
ASSIGN_CURRENT_STORAGE(instance, struct Nettle_Hash_State_struct, 1,
Nettle_Hash_State_program);

werror( "SHA3_512"  ".State->INIT\n");

sha3_512_init(&THIS->sha3_512); 
instance->ctx = &THIS->sha3_512;
}

#ifdef Nettle_SHA3_512_State_event_handler_defined
static void Nettle_SHA3_512_State_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Nettle_SHA3_512_State_defined
  case PROG_EVENT_INIT: init_Nettle_SHA3_512_State_struct(); break;

#endif /* internal_init_Nettle_SHA3_512_State_defined */
  default: break; 
  }
}

#endif /* Nettle_SHA3_512_State_event_handler_defined */
/*! @endclass State
*/


#ifdef Nettle_SHA3_512_event_handler_defined
static void Nettle_SHA3_512_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Nettle_SHA3_512_defined
  case PROG_EVENT_INIT: init_Nettle_SHA3_512_struct(); break;

#endif /* internal_init_Nettle_SHA3_512_defined */
  default: break; 
  }
}

#endif /* Nettle_SHA3_512_event_handler_defined */
/*! @endclass SHA3_512
*/


#line 86 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#line 699 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"




#line 703 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
#endif /* HAVE_NETTLE_SHA3_H && NETTLE_SHA3_FIPS202 */

#ifdef HAVE_NETTLE_RIPEMD160_H



#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
/* -*- C -*-
 *
 * Cmod header-file acting as a template for the hash classes.
 */

/*! @class RIPEMD160
*!
*! Implementation of the RIPEMD160 hash algorithm.
*!
*/

#undef class_Nettle_RIPEMD160_defined
#define class_Nettle_RIPEMD160_defined
DEFAULT_CMOD_STORAGE struct program *Nettle_RIPEMD160_program=NULL;

#ifdef Nettle_RIPEMD160_program_fun_num_used
DEFAULT_CMOD_STORAGE int Nettle_RIPEMD160_program_fun_num=-1;
#endif /* Nettle_RIPEMD160_program_fun_num_used */
/*! @decl inherit Hash
*/

#undef inherit_Nettle_Hash_Nettle_RIPEMD160_defined
#define inherit_Nettle_Hash_Nettle_RIPEMD160_defined
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
static int Nettle_RIPEMD160_Nettle_Hash_inh_num = -1;
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
static int Nettle_RIPEMD160_Nettle_Hash_inh_offset = -1;

#undef internal_init_Nettle_RIPEMD160_defined
#define internal_init_Nettle_RIPEMD160_defined

#undef Nettle_RIPEMD160_event_handler_defined
#define Nettle_RIPEMD160_event_handler_defined
static void init_Nettle_RIPEMD160_struct(void)
#line 18 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
struct Nettle_Hash_struct *hash;
ASSIGN_CURRENT_STORAGE(hash, struct Nettle_Hash_struct, 1,
Nettle_Hash_program);

werror( "RIPEMD160"  "->INIT\n");

hash->meta = &nettle_ripemd160;
}

/*! @class State
*!
*! State for RIPEMD160 hashing.
*!
*/

#undef class_Nettle_RIPEMD160_State_defined
#define class_Nettle_RIPEMD160_State_defined
DEFAULT_CMOD_STORAGE struct program *Nettle_RIPEMD160_State_program=NULL;

#ifdef Nettle_RIPEMD160_State_program_fun_num_used
DEFAULT_CMOD_STORAGE int Nettle_RIPEMD160_State_program_fun_num=-1;
#endif /* Nettle_RIPEMD160_State_program_fun_num_used */
/*! @decl inherit Hash::State
*/


#undef extra_Nettle_RIPEMD160_State_defined
#define extra_Nettle_RIPEMD160_State_defined

#undef var_ripemd160_Nettle_RIPEMD160_State_defined
#define var_ripemd160_Nettle_RIPEMD160_State_defined

#undef THIS
#define THIS ((struct Nettle_RIPEMD160_State_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef THIS_NETTLE_RIPEMD160_STATE
#define THIS_NETTLE_RIPEMD160_STATE ((struct Nettle_RIPEMD160_State_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef OBJ2_NETTLE_RIPEMD160_STATE
#define OBJ2_NETTLE_RIPEMD160_STATE(o) ((struct Nettle_RIPEMD160_State_struct *)(o->storage+Nettle_RIPEMD160_State_storage_offset))

#undef GET_NETTLE_RIPEMD160_STATE_STORAGE
#define GET_NETTLE_RIPEMD160_STATE_STORAGE(o) ((struct Nettle_RIPEMD160_State_struct *)(o->storage+Nettle_RIPEMD160_State_storage_offset)
static ptrdiff_t Nettle_RIPEMD160_State_storage_offset;
struct Nettle_RIPEMD160_State_struct {

#ifdef var_ripemd160_Nettle_RIPEMD160_State_defined
#line 64 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
struct ripemd160_ctx ripemd160;
#endif /* var_ripemd160_Nettle_RIPEMD160_State_defined */
};
#ifdef PIKE_DEBUG
/* Ensure the struct is used in a variable declaration, or else gdb might not see it. */
static struct Nettle_RIPEMD160_State_struct *Nettle_RIPEMD160_State_gdb_dummy_ptr;
#endif

#undef internal_init_Nettle_RIPEMD160_State_defined
#define internal_init_Nettle_RIPEMD160_State_defined

#undef Nettle_RIPEMD160_State_event_handler_defined
#define Nettle_RIPEMD160_State_event_handler_defined
static void init_Nettle_RIPEMD160_State_struct(void)
#line 67 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
struct Nettle_Hash_State_struct *instance;
ASSIGN_CURRENT_STORAGE(instance, struct Nettle_Hash_State_struct, 1,
Nettle_Hash_State_program);

werror( "RIPEMD160"  ".State->INIT\n");

ripemd160_init(&THIS->ripemd160); 
instance->ctx = &THIS->ripemd160;
}

#ifdef Nettle_RIPEMD160_State_event_handler_defined
static void Nettle_RIPEMD160_State_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Nettle_RIPEMD160_State_defined
  case PROG_EVENT_INIT: init_Nettle_RIPEMD160_State_struct(); break;

#endif /* internal_init_Nettle_RIPEMD160_State_defined */
  default: break; 
  }
}

#endif /* Nettle_RIPEMD160_State_event_handler_defined */
/*! @endclass State
*/


#ifdef Nettle_RIPEMD160_event_handler_defined
static void Nettle_RIPEMD160_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Nettle_RIPEMD160_defined
  case PROG_EVENT_INIT: init_Nettle_RIPEMD160_struct(); break;

#endif /* internal_init_Nettle_RIPEMD160_defined */
  default: break; 
  }
}

#endif /* Nettle_RIPEMD160_event_handler_defined */
/*! @endclass RIPEMD160
*/


#line 86 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#line 709 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"




#line 713 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
#endif

#ifdef HAVE_NETTLE_GOSTHASH94_H



#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#line 1 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
/* -*- C -*-
 *
 * Cmod header-file acting as a template for the hash classes.
 */

/*! @class GOST94
*!
*! Implementation of the GOST94 hash algorithm.
*!
*/

#undef class_Nettle_GOST94_defined
#define class_Nettle_GOST94_defined
DEFAULT_CMOD_STORAGE struct program *Nettle_GOST94_program=NULL;

#ifdef Nettle_GOST94_program_fun_num_used
DEFAULT_CMOD_STORAGE int Nettle_GOST94_program_fun_num=-1;
#endif /* Nettle_GOST94_program_fun_num_used */
/*! @decl inherit Hash
*/

#undef inherit_Nettle_Hash_Nettle_GOST94_defined
#define inherit_Nettle_Hash_Nettle_GOST94_defined
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
static int Nettle_GOST94_Nettle_Hash_inh_num = -1;
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
static int Nettle_GOST94_Nettle_Hash_inh_offset = -1;

#undef internal_init_Nettle_GOST94_defined
#define internal_init_Nettle_GOST94_defined

#undef Nettle_GOST94_event_handler_defined
#define Nettle_GOST94_event_handler_defined
static void init_Nettle_GOST94_struct(void)
#line 18 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
struct Nettle_Hash_struct *hash;
ASSIGN_CURRENT_STORAGE(hash, struct Nettle_Hash_struct, 1,
Nettle_Hash_program);

werror( "GOST94"  "->INIT\n");

hash->meta = &nettle_gosthash94;
}

/*! @class State
*!
*! State for GOST94 hashing.
*!
*/

#undef class_Nettle_GOST94_State_defined
#define class_Nettle_GOST94_State_defined
DEFAULT_CMOD_STORAGE struct program *Nettle_GOST94_State_program=NULL;

#ifdef Nettle_GOST94_State_program_fun_num_used
DEFAULT_CMOD_STORAGE int Nettle_GOST94_State_program_fun_num=-1;
#endif /* Nettle_GOST94_State_program_fun_num_used */
/*! @decl inherit Hash::State
*/


#undef extra_Nettle_GOST94_State_defined
#define extra_Nettle_GOST94_State_defined

#undef var_gosthash94_Nettle_GOST94_State_defined
#define var_gosthash94_Nettle_GOST94_State_defined

#undef THIS
#define THIS ((struct Nettle_GOST94_State_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef THIS_NETTLE_GOST94_STATE
#define THIS_NETTLE_GOST94_STATE ((struct Nettle_GOST94_State_struct *)(Pike_interpreter.frame_pointer->current_storage))

#undef OBJ2_NETTLE_GOST94_STATE
#define OBJ2_NETTLE_GOST94_STATE(o) ((struct Nettle_GOST94_State_struct *)(o->storage+Nettle_GOST94_State_storage_offset))

#undef GET_NETTLE_GOST94_STATE_STORAGE
#define GET_NETTLE_GOST94_STATE_STORAGE(o) ((struct Nettle_GOST94_State_struct *)(o->storage+Nettle_GOST94_State_storage_offset)
static ptrdiff_t Nettle_GOST94_State_storage_offset;
struct Nettle_GOST94_State_struct {

#ifdef var_gosthash94_Nettle_GOST94_State_defined
#line 64 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
struct gosthash94_ctx gosthash94;
#endif /* var_gosthash94_Nettle_GOST94_State_defined */
};
#ifdef PIKE_DEBUG
/* Ensure the struct is used in a variable declaration, or else gdb might not see it. */
static struct Nettle_GOST94_State_struct *Nettle_GOST94_State_gdb_dummy_ptr;
#endif

#undef internal_init_Nettle_GOST94_State_defined
#define internal_init_Nettle_GOST94_State_defined

#undef Nettle_GOST94_State_event_handler_defined
#define Nettle_GOST94_State_event_handler_defined
static void init_Nettle_GOST94_State_struct(void)
#line 67 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
struct Nettle_Hash_State_struct *instance;
ASSIGN_CURRENT_STORAGE(instance, struct Nettle_Hash_State_struct, 1,
Nettle_Hash_State_program);

werror( "GOST94"  ".State->INIT\n");

gosthash94_init(&THIS->gosthash94); 
instance->ctx = &THIS->gosthash94;
}

#ifdef Nettle_GOST94_State_event_handler_defined
static void Nettle_GOST94_State_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Nettle_GOST94_State_defined
  case PROG_EVENT_INIT: init_Nettle_GOST94_State_struct(); break;

#endif /* internal_init_Nettle_GOST94_State_defined */
  default: break; 
  }
}

#endif /* Nettle_GOST94_State_event_handler_defined */
/*! @endclass State
*/


#ifdef Nettle_GOST94_event_handler_defined
static void Nettle_GOST94_event_handler(int ev) {
  switch(ev) {

#ifdef internal_init_Nettle_GOST94_defined
  case PROG_EVENT_INIT: init_Nettle_GOST94_struct(); break;

#endif /* internal_init_Nettle_GOST94_defined */
  default: break; 
  }
}

#endif /* Nettle_GOST94_event_handler_defined */
/*! @endclass GOST94
*/


#line 86 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#line 719 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"




#line 723 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
#endif

/*! @endmodule Nettle */

void
hash_init(void)
{
werror("Nettle, hash init\n");

#ifdef module_strings_declared
module_strings[0] = 
  make_shared_binary_string("censored",
                            CONSTANT_STRLEN("censored"));
module_strings[1] = 
  make_shared_binary_string("State",
                            CONSTANT_STRLEN("State"));
module_strings[2] = 
  make_shared_binary_string("__builtin.Nettle.Hash",
                            CONSTANT_STRLEN("__builtin.Nettle.Hash"));
#endif

#ifdef CMOD_MAP_PROGRAM_IDS_DEFINED
set_program_id_to_id( ___cmod_map_program_ids );

#endif /* CMOD_MAP_PROGRAM_IDS_DEFINED */

#ifdef class_Nettle_Hash_defined

#ifdef PROG_NETTLE_HASH_ID
#line 53 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
  START_NEW_PROGRAM_ID(NETTLE_HASH);
#else
#line 53 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
  start_new_program();

#endif /* PROG_NETTLE_HASH_ID */
#line 53 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
  Nettle_Hash_program = Pike_compiler->new_program;

#ifndef tObjImpl_NETTLE_HASH

#undef tObjIs_NETTLE_HASH
#define tObjIs_NETTLE_HASH "\3\1\177\0\0\2"

#undef tObjImpl_NETTLE_HASH
#define tObjImpl_NETTLE_HASH "\3\0\177\0\0\2"

#endif /* tObjImpl_NETTLE_HASH */

#ifdef THIS_NETTLE_HASH
  Nettle_Hash_storage_offset = ADD_STORAGE(struct Nettle_Hash_struct);
#endif /* THIS_NETTLE_HASH */

#ifdef inherit_cq__22__builtin_2ENettle_2EHash_22_Nettle_Hash_defined
#line 57 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
  Nettle_Hash_cq__22__builtin_2ENettle_2EHash_22_inh_num = Pike_compiler->new_program->num_inherits;
  do {
#line 57 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    struct program *p = resolve_program(module_strings[2] /* "__builtin.Nettle.Hash" */);
    if (p) {
#line 57 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
      low_inherit(p, NULL, -1, 0, 0, NULL);
#line 57 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
      Nettle_Hash_cq__22__builtin_2ENettle_2EHash_22_inh_offset = Pike_compiler->new_program->inherits[Nettle_Hash_cq__22__builtin_2ENettle_2EHash_22_inh_num].identifier_level;
#line 57 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
      free_program(p);
    } else {
#line 57 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
      yyerror("Inherit failed.");
    }
  } while(0);
#endif /* inherit_cq__22__builtin_2ENettle_2EHash_22_Nettle_Hash_defined */

#ifdef class_Nettle_Hash_State_defined

#ifdef PROG_NETTLE_HASH_STATE_ID
#line 467 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
  START_NEW_PROGRAM_ID(NETTLE_HASH_STATE);
#else
#line 467 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
  start_new_program();

#endif /* PROG_NETTLE_HASH_STATE_ID */
#line 467 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
  Nettle_Hash_State_program = Pike_compiler->new_program;

#ifndef tObjImpl_NETTLE_HASH_STATE

#undef tObjIs_NETTLE_HASH_STATE
#define tObjIs_NETTLE_HASH_STATE "\3\1\177\0\0\3"

#undef tObjImpl_NETTLE_HASH_STATE
#define tObjImpl_NETTLE_HASH_STATE "\3\0\177\0\0\3"

#endif /* tObjImpl_NETTLE_HASH_STATE */

#ifdef THIS_NETTLE_HASH_STATE
  Nettle_Hash_State_storage_offset = ADD_STORAGE(struct Nettle_Hash_State_struct);
#endif /* THIS_NETTLE_HASH_STATE */

#ifdef extra_Nettle_Hash_State_defined
#line 474 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
{
/* Perform an inherit of the State class (if any) that our parent
       * may contain via its inherit of __builtin.Nettle.Hash.
       */
struct program *parent_prog = Pike_compiler->previous->new_program;
struct object *parent_obj = Pike_compiler->previous->fake_object;
int parent_State_fun_num =
really_low_find_shared_string_identifier(module_strings[1] /* "State" */,
parent_prog,
SEE_PROTECTED|SEE_PRIVATE);
if (parent_State_fun_num >= 0) {
struct program *parent_State_prog =
low_program_from_function(parent_obj, parent_State_fun_num);
if (parent_State_prog) {
parent_State_fun_num =
really_low_reference_inherited_identifier(Pike_compiler->previous,
0, parent_State_fun_num);
low_inherit(parent_State_prog, 0,
parent_State_fun_num,
1 + 42, 0, NULL);
}
}
}


#endif /* extra_Nettle_Hash_State_defined */

#ifdef Nettle_Hash_State_event_handler_defined
  pike_set_prog_event_callback(Nettle_Hash_State_event_handler);

#ifndef Nettle_Hash_State_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Nettle_Hash_State_gc_live_obj */

#endif /* Nettle_Hash_State_event_handler_defined */

#ifdef f_Nettle_Hash_State_update_defined

#ifdef f_Nettle_Hash_State_update_fun_num_used
  f_Nettle_Hash_State_update_fun_num =
#endif /* f_Nettle_Hash_State_update_fun_num_used */
#line 514 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    ADD_FUNCTION2("update", f_Nettle_Hash_State_update, tFunc(tStr8, tObjImpl_NETTLE_HASH_STATE), 0, OPT_SIDE_EFFECT);

#endif /* f_Nettle_Hash_State_update_defined */

#ifdef f_Nettle_Hash_State_digest_defined

#ifdef f_Nettle_Hash_State_digest_fun_num_used
  f_Nettle_Hash_State_digest_fun_num =
#endif /* f_Nettle_Hash_State_digest_fun_num_used */
#line 550 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    ADD_FUNCTION2("digest", f_Nettle_Hash_State_digest, tFunc(tOr("\10\200\0\0\0\177\377\377\377",tVoid),tStr8), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Nettle_Hash_State_digest_defined */
#line 468 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
  Pike_compiler->new_program->flags |= PROGRAM_USES_PARENT|PROGRAM_NEEDS_PARENT|PROGRAM_CLEAR_STORAGE;
#line 467 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
  Nettle_Hash_State_program=end_program();
#line 467 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
#ifdef Nettle_Hash_State_program_fun_num_used
Nettle_Hash_State_program_fun_num=
#endif
 add_program_constant("State",Nettle_Hash_State_program,0);

#endif /* class_Nettle_Hash_State_defined */

#ifdef Nettle_Hash_event_handler_defined
  pike_set_prog_event_callback(Nettle_Hash_event_handler);

#ifndef Nettle_Hash_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Nettle_Hash_gc_live_obj */

#endif /* Nettle_Hash_event_handler_defined */

#ifdef f_Nettle_Hash_name_defined

#ifdef f_Nettle_Hash_name_fun_num_used
  f_Nettle_Hash_name_fun_num =
#endif /* f_Nettle_Hash_name_fun_num_used */
#line 65 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    ADD_FUNCTION2("name", f_Nettle_Hash_name, tFunc(tNone,tStr8), 0, OPT_TRY_OPTIMIZE);

#endif /* f_Nettle_Hash_name_defined */

#ifdef f_Nettle_Hash_digest_size_defined

#ifdef f_Nettle_Hash_digest_size_fun_num_used
  f_Nettle_Hash_digest_size_fun_num =
#endif /* f_Nettle_Hash_digest_size_fun_num_used */
#line 78 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    ADD_FUNCTION2("digest_size", f_Nettle_Hash_digest_size, tFunc(tNone,"\10\0\0\0\0\177\377\377\377"), 0, OPT_TRY_OPTIMIZE);

#endif /* f_Nettle_Hash_digest_size_defined */

#ifdef f_Nettle_Hash_block_size_defined

#ifdef f_Nettle_Hash_block_size_fun_num_used
  f_Nettle_Hash_block_size_fun_num =
#endif /* f_Nettle_Hash_block_size_fun_num_used */
#line 91 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    ADD_FUNCTION2("block_size", f_Nettle_Hash_block_size, tFunc(tNone,"\10\0\0\0\0\177\377\377\377"), 0, OPT_TRY_OPTIMIZE);

#endif /* f_Nettle_Hash_block_size_defined */

#ifdef f_Nettle_Hash_hash_defined

#ifdef Nettle_Hash_f_Nettle_Hash_hash_fun_num_used
  Nettle_Hash_f_Nettle_Hash_hash_fun_num =
#endif /* Nettle_Hash_f_Nettle_Hash_hash_fun_num_used */
#line 174 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    ADD_FUNCTION2("hash", f_Nettle_Hash_hash, tOr(tFunc(tStr8,tStr8),tFunc(tObj tOr(tVoid,"\10\200\0\0\0\177\377\377\377"),tStr8)), 0, OPT_EXTERNAL_DEPEND);

#endif /* f_Nettle_Hash_hash_defined */

#ifdef f_Nettle_Hash_crypt_hash_defined

#ifdef f_Nettle_Hash_crypt_hash_fun_num_used
  f_Nettle_Hash_crypt_hash_fun_num =
#endif /* f_Nettle_Hash_crypt_hash_fun_num_used */
#line 260 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    ADD_FUNCTION2("crypt_hash", f_Nettle_Hash_crypt_hash, tFunc(tStr8 tStr8 tInt, tStr7), 0, OPT_EXTERNAL_DEPEND|OPT_SIDE_EFFECT);

#endif /* f_Nettle_Hash_crypt_hash_defined */
#line 53 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
  Nettle_Hash_program=end_program();
#line 53 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
#ifdef Nettle_Hash_program_fun_num_used
Nettle_Hash_program_fun_num=
#endif
 add_program_constant("Hash",Nettle_Hash_program,0);

#endif /* class_Nettle_Hash_defined */

#ifdef class_Nettle_MD5_defined

#ifdef PROG_NETTLE_MD5_ID
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
  START_NEW_PROGRAM_ID(NETTLE_MD5);
#else
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
  start_new_program();

#endif /* PROG_NETTLE_MD5_ID */
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
  Nettle_MD5_program = Pike_compiler->new_program;

#ifndef tObjImpl_NETTLE_MD5

#undef tObjIs_NETTLE_MD5
#define tObjIs_NETTLE_MD5 "\3\1\177\0\0\4"

#undef tObjImpl_NETTLE_MD5
#define tObjImpl_NETTLE_MD5 "\3\0\177\0\0\4"

#endif /* tObjImpl_NETTLE_MD5 */

#ifdef inherit_Nettle_Hash_Nettle_MD5_defined
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
  Nettle_MD5_Nettle_Hash_inh_num = Pike_compiler->new_program->num_inherits;
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
  low_inherit(Nettle_Hash_program, NULL, -1, 0, 0, NULL);
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
  Nettle_MD5_Nettle_Hash_inh_offset = Pike_compiler->new_program->inherits[Nettle_MD5_Nettle_Hash_inh_num].identifier_level;

#endif /* inherit_Nettle_Hash_Nettle_MD5_defined */

#ifdef class_Nettle_MD5_State_defined

#ifdef PROG_NETTLE_MD5_STATE_ID
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
  START_NEW_PROGRAM_ID(NETTLE_MD5_STATE);
#else
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
  start_new_program();

#endif /* PROG_NETTLE_MD5_STATE_ID */
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
  Nettle_MD5_State_program = Pike_compiler->new_program;

#ifndef tObjImpl_NETTLE_MD5_STATE

#undef tObjIs_NETTLE_MD5_STATE
#define tObjIs_NETTLE_MD5_STATE "\3\1\177\0\0\5"

#undef tObjImpl_NETTLE_MD5_STATE
#define tObjImpl_NETTLE_MD5_STATE "\3\0\177\0\0\5"

#endif /* tObjImpl_NETTLE_MD5_STATE */

#ifdef THIS_NETTLE_MD5_STATE
  Nettle_MD5_State_storage_offset = ADD_STORAGE(struct Nettle_MD5_State_struct);
#endif /* THIS_NETTLE_MD5_STATE */

#ifdef extra_Nettle_MD5_State_defined
#line 40 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
/* Perform an inherit of the Hash.State class that our parent
       * contains via its inherit of Hash.
       */
struct program *parent_prog = Pike_compiler->previous->new_program;
struct object *parent_obj = Pike_compiler->previous->fake_object;
int parent_State_fun_num =
really_low_find_shared_string_identifier(module_strings[1] /* "State" */,
parent_prog,
SEE_PROTECTED|SEE_PRIVATE);
if (parent_State_fun_num >= 0) {
struct program *parent_State_prog =
low_program_from_function(parent_obj, parent_State_fun_num);
if (parent_State_prog) {
parent_State_fun_num =
really_low_reference_inherited_identifier(Pike_compiler->previous,
0, parent_State_fun_num);
low_inherit(parent_State_prog, 0,
parent_State_fun_num,
1 + 42, 0, NULL);
}
}
}


#endif /* extra_Nettle_MD5_State_defined */

#ifdef Nettle_MD5_State_event_handler_defined
  pike_set_prog_event_callback(Nettle_MD5_State_event_handler);

#ifndef Nettle_MD5_State_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Nettle_MD5_State_gc_live_obj */

#endif /* Nettle_MD5_State_event_handler_defined */
#line 34 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Pike_compiler->new_program->flags |= PROGRAM_NEEDS_PARENT|PROGRAM_USES_PARENT;
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_MD5_State_program=end_program();
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#ifdef Nettle_MD5_State_program_fun_num_used
Nettle_MD5_State_program_fun_num=
#endif
 add_program_constant("State",Nettle_MD5_State_program,0);

#endif /* class_Nettle_MD5_State_defined */

#ifdef Nettle_MD5_event_handler_defined
  pike_set_prog_event_callback(Nettle_MD5_event_handler);

#ifndef Nettle_MD5_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Nettle_MD5_gc_live_obj */

#endif /* Nettle_MD5_event_handler_defined */
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_MD5_program=end_program();
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#ifdef Nettle_MD5_program_fun_num_used
Nettle_MD5_program_fun_num=
#endif
 add_program_constant("MD5",Nettle_MD5_program,0);

#endif /* class_Nettle_MD5_defined */

#ifdef class_Nettle_MD4_defined

#ifdef PROG_NETTLE_MD4_ID
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  START_NEW_PROGRAM_ID(NETTLE_MD4);
#else
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  start_new_program();

#endif /* PROG_NETTLE_MD4_ID */
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_MD4_program = Pike_compiler->new_program;

#ifndef tObjImpl_NETTLE_MD4

#undef tObjIs_NETTLE_MD4
#define tObjIs_NETTLE_MD4 "\3\1\177\0\0\6"

#undef tObjImpl_NETTLE_MD4
#define tObjImpl_NETTLE_MD4 "\3\0\177\0\0\6"

#endif /* tObjImpl_NETTLE_MD4 */

#ifdef inherit_Nettle_Hash_Nettle_MD4_defined
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_MD4_Nettle_Hash_inh_num = Pike_compiler->new_program->num_inherits;
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  low_inherit(Nettle_Hash_program, NULL, -1, 0, 0, NULL);
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_MD4_Nettle_Hash_inh_offset = Pike_compiler->new_program->inherits[Nettle_MD4_Nettle_Hash_inh_num].identifier_level;

#endif /* inherit_Nettle_Hash_Nettle_MD4_defined */

#ifdef class_Nettle_MD4_State_defined

#ifdef PROG_NETTLE_MD4_STATE_ID
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  START_NEW_PROGRAM_ID(NETTLE_MD4_STATE);
#else
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  start_new_program();

#endif /* PROG_NETTLE_MD4_STATE_ID */
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_MD4_State_program = Pike_compiler->new_program;

#ifndef tObjImpl_NETTLE_MD4_STATE

#undef tObjIs_NETTLE_MD4_STATE
#define tObjIs_NETTLE_MD4_STATE "\3\1\177\0\0\a"

#undef tObjImpl_NETTLE_MD4_STATE
#define tObjImpl_NETTLE_MD4_STATE "\3\0\177\0\0\a"

#endif /* tObjImpl_NETTLE_MD4_STATE */

#ifdef THIS_NETTLE_MD4_STATE
  Nettle_MD4_State_storage_offset = ADD_STORAGE(struct Nettle_MD4_State_struct);
#endif /* THIS_NETTLE_MD4_STATE */

#ifdef extra_Nettle_MD4_State_defined
#line 40 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
/* Perform an inherit of the Hash.State class that our parent
       * contains via its inherit of Hash.
       */
struct program *parent_prog = Pike_compiler->previous->new_program;
struct object *parent_obj = Pike_compiler->previous->fake_object;
int parent_State_fun_num =
really_low_find_shared_string_identifier(module_strings[1] /* "State" */,
parent_prog,
SEE_PROTECTED|SEE_PRIVATE);
if (parent_State_fun_num >= 0) {
struct program *parent_State_prog =
low_program_from_function(parent_obj, parent_State_fun_num);
if (parent_State_prog) {
parent_State_fun_num =
really_low_reference_inherited_identifier(Pike_compiler->previous,
0, parent_State_fun_num);
low_inherit(parent_State_prog, 0,
parent_State_fun_num,
1 + 42, 0, NULL);
}
}
}


#endif /* extra_Nettle_MD4_State_defined */

#ifdef Nettle_MD4_State_event_handler_defined
  pike_set_prog_event_callback(Nettle_MD4_State_event_handler);

#ifndef Nettle_MD4_State_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Nettle_MD4_State_gc_live_obj */

#endif /* Nettle_MD4_State_event_handler_defined */
#line 34 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Pike_compiler->new_program->flags |= PROGRAM_NEEDS_PARENT|PROGRAM_USES_PARENT;
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_MD4_State_program=end_program();
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#ifdef Nettle_MD4_State_program_fun_num_used
Nettle_MD4_State_program_fun_num=
#endif
 add_program_constant("State",Nettle_MD4_State_program,0);

#endif /* class_Nettle_MD4_State_defined */

#ifdef Nettle_MD4_event_handler_defined
  pike_set_prog_event_callback(Nettle_MD4_event_handler);

#ifndef Nettle_MD4_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Nettle_MD4_gc_live_obj */

#endif /* Nettle_MD4_event_handler_defined */
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_MD4_program=end_program();
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#ifdef Nettle_MD4_program_fun_num_used
Nettle_MD4_program_fun_num=
#endif
 add_program_constant("MD4",Nettle_MD4_program,0);

#endif /* class_Nettle_MD4_defined */

#ifdef class_Nettle_MD2_defined

#ifdef PROG_NETTLE_MD2_ID
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  START_NEW_PROGRAM_ID(NETTLE_MD2);
#else
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  start_new_program();

#endif /* PROG_NETTLE_MD2_ID */
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_MD2_program = Pike_compiler->new_program;

#ifndef tObjImpl_NETTLE_MD2

#undef tObjIs_NETTLE_MD2
#define tObjIs_NETTLE_MD2 "\3\1\177\0\0\b"

#undef tObjImpl_NETTLE_MD2
#define tObjImpl_NETTLE_MD2 "\3\0\177\0\0\b"

#endif /* tObjImpl_NETTLE_MD2 */

#ifdef inherit_Nettle_Hash_Nettle_MD2_defined
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_MD2_Nettle_Hash_inh_num = Pike_compiler->new_program->num_inherits;
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  low_inherit(Nettle_Hash_program, NULL, -1, 0, 0, NULL);
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_MD2_Nettle_Hash_inh_offset = Pike_compiler->new_program->inherits[Nettle_MD2_Nettle_Hash_inh_num].identifier_level;

#endif /* inherit_Nettle_Hash_Nettle_MD2_defined */

#ifdef class_Nettle_MD2_State_defined

#ifdef PROG_NETTLE_MD2_STATE_ID
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  START_NEW_PROGRAM_ID(NETTLE_MD2_STATE);
#else
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  start_new_program();

#endif /* PROG_NETTLE_MD2_STATE_ID */
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_MD2_State_program = Pike_compiler->new_program;

#ifndef tObjImpl_NETTLE_MD2_STATE

#undef tObjIs_NETTLE_MD2_STATE
#define tObjIs_NETTLE_MD2_STATE "\3\1\177\0\0\t"

#undef tObjImpl_NETTLE_MD2_STATE
#define tObjImpl_NETTLE_MD2_STATE "\3\0\177\0\0\t"

#endif /* tObjImpl_NETTLE_MD2_STATE */

#ifdef THIS_NETTLE_MD2_STATE
  Nettle_MD2_State_storage_offset = ADD_STORAGE(struct Nettle_MD2_State_struct);
#endif /* THIS_NETTLE_MD2_STATE */

#ifdef extra_Nettle_MD2_State_defined
#line 40 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
/* Perform an inherit of the Hash.State class that our parent
       * contains via its inherit of Hash.
       */
struct program *parent_prog = Pike_compiler->previous->new_program;
struct object *parent_obj = Pike_compiler->previous->fake_object;
int parent_State_fun_num =
really_low_find_shared_string_identifier(module_strings[1] /* "State" */,
parent_prog,
SEE_PROTECTED|SEE_PRIVATE);
if (parent_State_fun_num >= 0) {
struct program *parent_State_prog =
low_program_from_function(parent_obj, parent_State_fun_num);
if (parent_State_prog) {
parent_State_fun_num =
really_low_reference_inherited_identifier(Pike_compiler->previous,
0, parent_State_fun_num);
low_inherit(parent_State_prog, 0,
parent_State_fun_num,
1 + 42, 0, NULL);
}
}
}


#endif /* extra_Nettle_MD2_State_defined */

#ifdef Nettle_MD2_State_event_handler_defined
  pike_set_prog_event_callback(Nettle_MD2_State_event_handler);

#ifndef Nettle_MD2_State_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Nettle_MD2_State_gc_live_obj */

#endif /* Nettle_MD2_State_event_handler_defined */
#line 34 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Pike_compiler->new_program->flags |= PROGRAM_NEEDS_PARENT|PROGRAM_USES_PARENT;
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_MD2_State_program=end_program();
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#ifdef Nettle_MD2_State_program_fun_num_used
Nettle_MD2_State_program_fun_num=
#endif
 add_program_constant("State",Nettle_MD2_State_program,0);

#endif /* class_Nettle_MD2_State_defined */

#ifdef Nettle_MD2_event_handler_defined
  pike_set_prog_event_callback(Nettle_MD2_event_handler);

#ifndef Nettle_MD2_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Nettle_MD2_gc_live_obj */

#endif /* Nettle_MD2_event_handler_defined */
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_MD2_program=end_program();
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#ifdef Nettle_MD2_program_fun_num_used
Nettle_MD2_program_fun_num=
#endif
 add_program_constant("MD2",Nettle_MD2_program,0);

#endif /* class_Nettle_MD2_defined */

#ifdef class_Nettle_SHA1_defined

#ifdef PROG_NETTLE_SHA1_ID
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  START_NEW_PROGRAM_ID(NETTLE_SHA1);
#else
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  start_new_program();

#endif /* PROG_NETTLE_SHA1_ID */
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA1_program = Pike_compiler->new_program;

#ifndef tObjImpl_NETTLE_SHA1

#undef tObjIs_NETTLE_SHA1
#define tObjIs_NETTLE_SHA1 "\3\1\177\0\0\n"

#undef tObjImpl_NETTLE_SHA1
#define tObjImpl_NETTLE_SHA1 "\3\0\177\0\0\n"

#endif /* tObjImpl_NETTLE_SHA1 */

#ifdef inherit_Nettle_Hash_Nettle_SHA1_defined
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA1_Nettle_Hash_inh_num = Pike_compiler->new_program->num_inherits;
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  low_inherit(Nettle_Hash_program, NULL, -1, 0, 0, NULL);
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA1_Nettle_Hash_inh_offset = Pike_compiler->new_program->inherits[Nettle_SHA1_Nettle_Hash_inh_num].identifier_level;

#endif /* inherit_Nettle_Hash_Nettle_SHA1_defined */

#ifdef class_Nettle_SHA1_State_defined

#ifdef PROG_NETTLE_SHA1_STATE_ID
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  START_NEW_PROGRAM_ID(NETTLE_SHA1_STATE);
#else
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  start_new_program();

#endif /* PROG_NETTLE_SHA1_STATE_ID */
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA1_State_program = Pike_compiler->new_program;

#ifndef tObjImpl_NETTLE_SHA1_STATE

#undef tObjIs_NETTLE_SHA1_STATE
#define tObjIs_NETTLE_SHA1_STATE "\3\1\177\0\0\v"

#undef tObjImpl_NETTLE_SHA1_STATE
#define tObjImpl_NETTLE_SHA1_STATE "\3\0\177\0\0\v"

#endif /* tObjImpl_NETTLE_SHA1_STATE */

#ifdef THIS_NETTLE_SHA1_STATE
  Nettle_SHA1_State_storage_offset = ADD_STORAGE(struct Nettle_SHA1_State_struct);
#endif /* THIS_NETTLE_SHA1_STATE */

#ifdef extra_Nettle_SHA1_State_defined
#line 40 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
/* Perform an inherit of the Hash.State class that our parent
       * contains via its inherit of Hash.
       */
struct program *parent_prog = Pike_compiler->previous->new_program;
struct object *parent_obj = Pike_compiler->previous->fake_object;
int parent_State_fun_num =
really_low_find_shared_string_identifier(module_strings[1] /* "State" */,
parent_prog,
SEE_PROTECTED|SEE_PRIVATE);
if (parent_State_fun_num >= 0) {
struct program *parent_State_prog =
low_program_from_function(parent_obj, parent_State_fun_num);
if (parent_State_prog) {
parent_State_fun_num =
really_low_reference_inherited_identifier(Pike_compiler->previous,
0, parent_State_fun_num);
low_inherit(parent_State_prog, 0,
parent_State_fun_num,
1 + 42, 0, NULL);
}
}
}


#endif /* extra_Nettle_SHA1_State_defined */

#ifdef Nettle_SHA1_State_event_handler_defined
  pike_set_prog_event_callback(Nettle_SHA1_State_event_handler);

#ifndef Nettle_SHA1_State_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Nettle_SHA1_State_gc_live_obj */

#endif /* Nettle_SHA1_State_event_handler_defined */
#line 34 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Pike_compiler->new_program->flags |= PROGRAM_NEEDS_PARENT|PROGRAM_USES_PARENT;
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA1_State_program=end_program();
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#ifdef Nettle_SHA1_State_program_fun_num_used
Nettle_SHA1_State_program_fun_num=
#endif
 add_program_constant("State",Nettle_SHA1_State_program,0);

#endif /* class_Nettle_SHA1_State_defined */

#ifdef Nettle_SHA1_event_handler_defined
  pike_set_prog_event_callback(Nettle_SHA1_event_handler);

#ifndef Nettle_SHA1_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Nettle_SHA1_gc_live_obj */

#endif /* Nettle_SHA1_event_handler_defined */
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA1_program=end_program();
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#ifdef Nettle_SHA1_program_fun_num_used
Nettle_SHA1_program_fun_num=
#endif
 add_program_constant("SHA1",Nettle_SHA1_program,0);

#endif /* class_Nettle_SHA1_defined */

#ifdef class_Nettle_SHA224_defined

#ifdef PROG_NETTLE_SHA224_ID
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  START_NEW_PROGRAM_ID(NETTLE_SHA224);
#else
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  start_new_program();

#endif /* PROG_NETTLE_SHA224_ID */
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA224_program = Pike_compiler->new_program;

#ifndef tObjImpl_NETTLE_SHA224

#undef tObjIs_NETTLE_SHA224
#define tObjIs_NETTLE_SHA224 "\3\1\177\0\0\f"

#undef tObjImpl_NETTLE_SHA224
#define tObjImpl_NETTLE_SHA224 "\3\0\177\0\0\f"

#endif /* tObjImpl_NETTLE_SHA224 */

#ifdef inherit_Nettle_Hash_Nettle_SHA224_defined
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA224_Nettle_Hash_inh_num = Pike_compiler->new_program->num_inherits;
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  low_inherit(Nettle_Hash_program, NULL, -1, 0, 0, NULL);
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA224_Nettle_Hash_inh_offset = Pike_compiler->new_program->inherits[Nettle_SHA224_Nettle_Hash_inh_num].identifier_level;

#endif /* inherit_Nettle_Hash_Nettle_SHA224_defined */

#ifdef class_Nettle_SHA224_State_defined

#ifdef PROG_NETTLE_SHA224_STATE_ID
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  START_NEW_PROGRAM_ID(NETTLE_SHA224_STATE);
#else
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  start_new_program();

#endif /* PROG_NETTLE_SHA224_STATE_ID */
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA224_State_program = Pike_compiler->new_program;

#ifndef tObjImpl_NETTLE_SHA224_STATE

#undef tObjIs_NETTLE_SHA224_STATE
#define tObjIs_NETTLE_SHA224_STATE "\3\1\177\0\0\r"

#undef tObjImpl_NETTLE_SHA224_STATE
#define tObjImpl_NETTLE_SHA224_STATE "\3\0\177\0\0\r"

#endif /* tObjImpl_NETTLE_SHA224_STATE */

#ifdef THIS_NETTLE_SHA224_STATE
  Nettle_SHA224_State_storage_offset = ADD_STORAGE(struct Nettle_SHA224_State_struct);
#endif /* THIS_NETTLE_SHA224_STATE */

#ifdef extra_Nettle_SHA224_State_defined
#line 40 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
/* Perform an inherit of the Hash.State class that our parent
       * contains via its inherit of Hash.
       */
struct program *parent_prog = Pike_compiler->previous->new_program;
struct object *parent_obj = Pike_compiler->previous->fake_object;
int parent_State_fun_num =
really_low_find_shared_string_identifier(module_strings[1] /* "State" */,
parent_prog,
SEE_PROTECTED|SEE_PRIVATE);
if (parent_State_fun_num >= 0) {
struct program *parent_State_prog =
low_program_from_function(parent_obj, parent_State_fun_num);
if (parent_State_prog) {
parent_State_fun_num =
really_low_reference_inherited_identifier(Pike_compiler->previous,
0, parent_State_fun_num);
low_inherit(parent_State_prog, 0,
parent_State_fun_num,
1 + 42, 0, NULL);
}
}
}


#endif /* extra_Nettle_SHA224_State_defined */

#ifdef Nettle_SHA224_State_event_handler_defined
  pike_set_prog_event_callback(Nettle_SHA224_State_event_handler);

#ifndef Nettle_SHA224_State_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Nettle_SHA224_State_gc_live_obj */

#endif /* Nettle_SHA224_State_event_handler_defined */
#line 34 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Pike_compiler->new_program->flags |= PROGRAM_NEEDS_PARENT|PROGRAM_USES_PARENT;
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA224_State_program=end_program();
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#ifdef Nettle_SHA224_State_program_fun_num_used
Nettle_SHA224_State_program_fun_num=
#endif
 add_program_constant("State",Nettle_SHA224_State_program,0);

#endif /* class_Nettle_SHA224_State_defined */

#ifdef Nettle_SHA224_event_handler_defined
  pike_set_prog_event_callback(Nettle_SHA224_event_handler);

#ifndef Nettle_SHA224_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Nettle_SHA224_gc_live_obj */

#endif /* Nettle_SHA224_event_handler_defined */
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA224_program=end_program();
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#ifdef Nettle_SHA224_program_fun_num_used
Nettle_SHA224_program_fun_num=
#endif
 add_program_constant("SHA224",Nettle_SHA224_program,0);

#endif /* class_Nettle_SHA224_defined */

#ifdef class_Nettle_SHA256_defined

#ifdef PROG_NETTLE_SHA256_ID
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  START_NEW_PROGRAM_ID(NETTLE_SHA256);
#else
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  start_new_program();

#endif /* PROG_NETTLE_SHA256_ID */
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA256_program = Pike_compiler->new_program;

#ifndef tObjImpl_NETTLE_SHA256

#undef tObjIs_NETTLE_SHA256
#define tObjIs_NETTLE_SHA256 "\3\1\177\0\0\16"

#undef tObjImpl_NETTLE_SHA256
#define tObjImpl_NETTLE_SHA256 "\3\0\177\0\0\16"

#endif /* tObjImpl_NETTLE_SHA256 */

#ifdef inherit_Nettle_Hash_Nettle_SHA256_defined
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA256_Nettle_Hash_inh_num = Pike_compiler->new_program->num_inherits;
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  low_inherit(Nettle_Hash_program, NULL, -1, 0, 0, NULL);
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA256_Nettle_Hash_inh_offset = Pike_compiler->new_program->inherits[Nettle_SHA256_Nettle_Hash_inh_num].identifier_level;

#endif /* inherit_Nettle_Hash_Nettle_SHA256_defined */

#ifdef class_Nettle_SHA256_State_defined

#ifdef PROG_NETTLE_SHA256_STATE_ID
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  START_NEW_PROGRAM_ID(NETTLE_SHA256_STATE);
#else
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  start_new_program();

#endif /* PROG_NETTLE_SHA256_STATE_ID */
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA256_State_program = Pike_compiler->new_program;

#ifndef tObjImpl_NETTLE_SHA256_STATE

#undef tObjIs_NETTLE_SHA256_STATE
#define tObjIs_NETTLE_SHA256_STATE "\3\1\177\0\0\17"

#undef tObjImpl_NETTLE_SHA256_STATE
#define tObjImpl_NETTLE_SHA256_STATE "\3\0\177\0\0\17"

#endif /* tObjImpl_NETTLE_SHA256_STATE */

#ifdef THIS_NETTLE_SHA256_STATE
  Nettle_SHA256_State_storage_offset = ADD_STORAGE(struct Nettle_SHA256_State_struct);
#endif /* THIS_NETTLE_SHA256_STATE */

#ifdef extra_Nettle_SHA256_State_defined
#line 40 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
/* Perform an inherit of the Hash.State class that our parent
       * contains via its inherit of Hash.
       */
struct program *parent_prog = Pike_compiler->previous->new_program;
struct object *parent_obj = Pike_compiler->previous->fake_object;
int parent_State_fun_num =
really_low_find_shared_string_identifier(module_strings[1] /* "State" */,
parent_prog,
SEE_PROTECTED|SEE_PRIVATE);
if (parent_State_fun_num >= 0) {
struct program *parent_State_prog =
low_program_from_function(parent_obj, parent_State_fun_num);
if (parent_State_prog) {
parent_State_fun_num =
really_low_reference_inherited_identifier(Pike_compiler->previous,
0, parent_State_fun_num);
low_inherit(parent_State_prog, 0,
parent_State_fun_num,
1 + 42, 0, NULL);
}
}
}


#endif /* extra_Nettle_SHA256_State_defined */

#ifdef Nettle_SHA256_State_event_handler_defined
  pike_set_prog_event_callback(Nettle_SHA256_State_event_handler);

#ifndef Nettle_SHA256_State_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Nettle_SHA256_State_gc_live_obj */

#endif /* Nettle_SHA256_State_event_handler_defined */
#line 34 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Pike_compiler->new_program->flags |= PROGRAM_NEEDS_PARENT|PROGRAM_USES_PARENT;
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA256_State_program=end_program();
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#ifdef Nettle_SHA256_State_program_fun_num_used
Nettle_SHA256_State_program_fun_num=
#endif
 add_program_constant("State",Nettle_SHA256_State_program,0);

#endif /* class_Nettle_SHA256_State_defined */

#ifdef Nettle_SHA256_event_handler_defined
  pike_set_prog_event_callback(Nettle_SHA256_event_handler);

#ifndef Nettle_SHA256_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Nettle_SHA256_gc_live_obj */

#endif /* Nettle_SHA256_event_handler_defined */
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA256_program=end_program();
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#ifdef Nettle_SHA256_program_fun_num_used
Nettle_SHA256_program_fun_num=
#endif
 add_program_constant("SHA256",Nettle_SHA256_program,0);

#endif /* class_Nettle_SHA256_defined */

#ifdef class_Nettle_SHA384_defined

#ifdef PROG_NETTLE_SHA384_ID
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  START_NEW_PROGRAM_ID(NETTLE_SHA384);
#else
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  start_new_program();

#endif /* PROG_NETTLE_SHA384_ID */
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA384_program = Pike_compiler->new_program;

#ifndef tObjImpl_NETTLE_SHA384

#undef tObjIs_NETTLE_SHA384
#define tObjIs_NETTLE_SHA384 "\3\1\177\0\0\20"

#undef tObjImpl_NETTLE_SHA384
#define tObjImpl_NETTLE_SHA384 "\3\0\177\0\0\20"

#endif /* tObjImpl_NETTLE_SHA384 */

#ifdef inherit_Nettle_Hash_Nettle_SHA384_defined
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA384_Nettle_Hash_inh_num = Pike_compiler->new_program->num_inherits;
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  low_inherit(Nettle_Hash_program, NULL, -1, 0, 0, NULL);
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA384_Nettle_Hash_inh_offset = Pike_compiler->new_program->inherits[Nettle_SHA384_Nettle_Hash_inh_num].identifier_level;

#endif /* inherit_Nettle_Hash_Nettle_SHA384_defined */

#ifdef class_Nettle_SHA384_State_defined

#ifdef PROG_NETTLE_SHA384_STATE_ID
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  START_NEW_PROGRAM_ID(NETTLE_SHA384_STATE);
#else
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  start_new_program();

#endif /* PROG_NETTLE_SHA384_STATE_ID */
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA384_State_program = Pike_compiler->new_program;

#ifndef tObjImpl_NETTLE_SHA384_STATE

#undef tObjIs_NETTLE_SHA384_STATE
#define tObjIs_NETTLE_SHA384_STATE "\3\1\177\0\0\21"

#undef tObjImpl_NETTLE_SHA384_STATE
#define tObjImpl_NETTLE_SHA384_STATE "\3\0\177\0\0\21"

#endif /* tObjImpl_NETTLE_SHA384_STATE */

#ifdef THIS_NETTLE_SHA384_STATE
  Nettle_SHA384_State_storage_offset = ADD_STORAGE(struct Nettle_SHA384_State_struct);
#endif /* THIS_NETTLE_SHA384_STATE */

#ifdef extra_Nettle_SHA384_State_defined
#line 40 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
/* Perform an inherit of the Hash.State class that our parent
       * contains via its inherit of Hash.
       */
struct program *parent_prog = Pike_compiler->previous->new_program;
struct object *parent_obj = Pike_compiler->previous->fake_object;
int parent_State_fun_num =
really_low_find_shared_string_identifier(module_strings[1] /* "State" */,
parent_prog,
SEE_PROTECTED|SEE_PRIVATE);
if (parent_State_fun_num >= 0) {
struct program *parent_State_prog =
low_program_from_function(parent_obj, parent_State_fun_num);
if (parent_State_prog) {
parent_State_fun_num =
really_low_reference_inherited_identifier(Pike_compiler->previous,
0, parent_State_fun_num);
low_inherit(parent_State_prog, 0,
parent_State_fun_num,
1 + 42, 0, NULL);
}
}
}


#endif /* extra_Nettle_SHA384_State_defined */

#ifdef Nettle_SHA384_State_event_handler_defined
  pike_set_prog_event_callback(Nettle_SHA384_State_event_handler);

#ifndef Nettle_SHA384_State_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Nettle_SHA384_State_gc_live_obj */

#endif /* Nettle_SHA384_State_event_handler_defined */
#line 34 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Pike_compiler->new_program->flags |= PROGRAM_NEEDS_PARENT|PROGRAM_USES_PARENT;
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA384_State_program=end_program();
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#ifdef Nettle_SHA384_State_program_fun_num_used
Nettle_SHA384_State_program_fun_num=
#endif
 add_program_constant("State",Nettle_SHA384_State_program,0);

#endif /* class_Nettle_SHA384_State_defined */

#ifdef Nettle_SHA384_event_handler_defined
  pike_set_prog_event_callback(Nettle_SHA384_event_handler);

#ifndef Nettle_SHA384_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Nettle_SHA384_gc_live_obj */

#endif /* Nettle_SHA384_event_handler_defined */
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA384_program=end_program();
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#ifdef Nettle_SHA384_program_fun_num_used
Nettle_SHA384_program_fun_num=
#endif
 add_program_constant("SHA384",Nettle_SHA384_program,0);

#endif /* class_Nettle_SHA384_defined */

#ifdef class_Nettle_SHA512_defined

#ifdef PROG_NETTLE_SHA512_ID
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  START_NEW_PROGRAM_ID(NETTLE_SHA512);
#else
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  start_new_program();

#endif /* PROG_NETTLE_SHA512_ID */
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA512_program = Pike_compiler->new_program;

#ifndef tObjImpl_NETTLE_SHA512

#undef tObjIs_NETTLE_SHA512
#define tObjIs_NETTLE_SHA512 "\3\1\177\0\0\22"

#undef tObjImpl_NETTLE_SHA512
#define tObjImpl_NETTLE_SHA512 "\3\0\177\0\0\22"

#endif /* tObjImpl_NETTLE_SHA512 */

#ifdef inherit_Nettle_Hash_Nettle_SHA512_defined
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA512_Nettle_Hash_inh_num = Pike_compiler->new_program->num_inherits;
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  low_inherit(Nettle_Hash_program, NULL, -1, 0, 0, NULL);
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA512_Nettle_Hash_inh_offset = Pike_compiler->new_program->inherits[Nettle_SHA512_Nettle_Hash_inh_num].identifier_level;

#endif /* inherit_Nettle_Hash_Nettle_SHA512_defined */

#ifdef class_Nettle_SHA512_State_defined

#ifdef PROG_NETTLE_SHA512_STATE_ID
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  START_NEW_PROGRAM_ID(NETTLE_SHA512_STATE);
#else
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  start_new_program();

#endif /* PROG_NETTLE_SHA512_STATE_ID */
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA512_State_program = Pike_compiler->new_program;

#ifndef tObjImpl_NETTLE_SHA512_STATE

#undef tObjIs_NETTLE_SHA512_STATE
#define tObjIs_NETTLE_SHA512_STATE "\3\1\177\0\0\23"

#undef tObjImpl_NETTLE_SHA512_STATE
#define tObjImpl_NETTLE_SHA512_STATE "\3\0\177\0\0\23"

#endif /* tObjImpl_NETTLE_SHA512_STATE */

#ifdef THIS_NETTLE_SHA512_STATE
  Nettle_SHA512_State_storage_offset = ADD_STORAGE(struct Nettle_SHA512_State_struct);
#endif /* THIS_NETTLE_SHA512_STATE */

#ifdef extra_Nettle_SHA512_State_defined
#line 40 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
/* Perform an inherit of the Hash.State class that our parent
       * contains via its inherit of Hash.
       */
struct program *parent_prog = Pike_compiler->previous->new_program;
struct object *parent_obj = Pike_compiler->previous->fake_object;
int parent_State_fun_num =
really_low_find_shared_string_identifier(module_strings[1] /* "State" */,
parent_prog,
SEE_PROTECTED|SEE_PRIVATE);
if (parent_State_fun_num >= 0) {
struct program *parent_State_prog =
low_program_from_function(parent_obj, parent_State_fun_num);
if (parent_State_prog) {
parent_State_fun_num =
really_low_reference_inherited_identifier(Pike_compiler->previous,
0, parent_State_fun_num);
low_inherit(parent_State_prog, 0,
parent_State_fun_num,
1 + 42, 0, NULL);
}
}
}


#endif /* extra_Nettle_SHA512_State_defined */

#ifdef Nettle_SHA512_State_event_handler_defined
  pike_set_prog_event_callback(Nettle_SHA512_State_event_handler);

#ifndef Nettle_SHA512_State_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Nettle_SHA512_State_gc_live_obj */

#endif /* Nettle_SHA512_State_event_handler_defined */
#line 34 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Pike_compiler->new_program->flags |= PROGRAM_NEEDS_PARENT|PROGRAM_USES_PARENT;
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA512_State_program=end_program();
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#ifdef Nettle_SHA512_State_program_fun_num_used
Nettle_SHA512_State_program_fun_num=
#endif
 add_program_constant("State",Nettle_SHA512_State_program,0);

#endif /* class_Nettle_SHA512_State_defined */

#ifdef Nettle_SHA512_event_handler_defined
  pike_set_prog_event_callback(Nettle_SHA512_event_handler);

#ifndef Nettle_SHA512_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Nettle_SHA512_gc_live_obj */

#endif /* Nettle_SHA512_event_handler_defined */
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA512_program=end_program();
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#ifdef Nettle_SHA512_program_fun_num_used
Nettle_SHA512_program_fun_num=
#endif
 add_program_constant("SHA512",Nettle_SHA512_program,0);

#endif /* class_Nettle_SHA512_defined */

#ifdef class_Nettle_SHA3_224_defined

#ifdef PROG_NETTLE_SHA3_224_ID
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  START_NEW_PROGRAM_ID(NETTLE_SHA3_224);
#else
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  start_new_program();

#endif /* PROG_NETTLE_SHA3_224_ID */
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA3_224_program = Pike_compiler->new_program;

#ifndef tObjImpl_NETTLE_SHA3_224

#undef tObjIs_NETTLE_SHA3_224
#define tObjIs_NETTLE_SHA3_224 "\3\1\177\0\0\24"

#undef tObjImpl_NETTLE_SHA3_224
#define tObjImpl_NETTLE_SHA3_224 "\3\0\177\0\0\24"

#endif /* tObjImpl_NETTLE_SHA3_224 */

#ifdef inherit_Nettle_Hash_Nettle_SHA3_224_defined
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA3_224_Nettle_Hash_inh_num = Pike_compiler->new_program->num_inherits;
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  low_inherit(Nettle_Hash_program, NULL, -1, 0, 0, NULL);
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA3_224_Nettle_Hash_inh_offset = Pike_compiler->new_program->inherits[Nettle_SHA3_224_Nettle_Hash_inh_num].identifier_level;

#endif /* inherit_Nettle_Hash_Nettle_SHA3_224_defined */

#ifdef class_Nettle_SHA3_224_State_defined

#ifdef PROG_NETTLE_SHA3_224_STATE_ID
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  START_NEW_PROGRAM_ID(NETTLE_SHA3_224_STATE);
#else
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  start_new_program();

#endif /* PROG_NETTLE_SHA3_224_STATE_ID */
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA3_224_State_program = Pike_compiler->new_program;

#ifndef tObjImpl_NETTLE_SHA3_224_STATE

#undef tObjIs_NETTLE_SHA3_224_STATE
#define tObjIs_NETTLE_SHA3_224_STATE "\3\1\177\0\0\25"

#undef tObjImpl_NETTLE_SHA3_224_STATE
#define tObjImpl_NETTLE_SHA3_224_STATE "\3\0\177\0\0\25"

#endif /* tObjImpl_NETTLE_SHA3_224_STATE */

#ifdef THIS_NETTLE_SHA3_224_STATE
  Nettle_SHA3_224_State_storage_offset = ADD_STORAGE(struct Nettle_SHA3_224_State_struct);
#endif /* THIS_NETTLE_SHA3_224_STATE */

#ifdef extra_Nettle_SHA3_224_State_defined
#line 40 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
/* Perform an inherit of the Hash.State class that our parent
       * contains via its inherit of Hash.
       */
struct program *parent_prog = Pike_compiler->previous->new_program;
struct object *parent_obj = Pike_compiler->previous->fake_object;
int parent_State_fun_num =
really_low_find_shared_string_identifier(module_strings[1] /* "State" */,
parent_prog,
SEE_PROTECTED|SEE_PRIVATE);
if (parent_State_fun_num >= 0) {
struct program *parent_State_prog =
low_program_from_function(parent_obj, parent_State_fun_num);
if (parent_State_prog) {
parent_State_fun_num =
really_low_reference_inherited_identifier(Pike_compiler->previous,
0, parent_State_fun_num);
low_inherit(parent_State_prog, 0,
parent_State_fun_num,
1 + 42, 0, NULL);
}
}
}


#endif /* extra_Nettle_SHA3_224_State_defined */

#ifdef Nettle_SHA3_224_State_event_handler_defined
  pike_set_prog_event_callback(Nettle_SHA3_224_State_event_handler);

#ifndef Nettle_SHA3_224_State_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Nettle_SHA3_224_State_gc_live_obj */

#endif /* Nettle_SHA3_224_State_event_handler_defined */
#line 34 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Pike_compiler->new_program->flags |= PROGRAM_NEEDS_PARENT|PROGRAM_USES_PARENT;
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA3_224_State_program=end_program();
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#ifdef Nettle_SHA3_224_State_program_fun_num_used
Nettle_SHA3_224_State_program_fun_num=
#endif
 add_program_constant("State",Nettle_SHA3_224_State_program,0);

#endif /* class_Nettle_SHA3_224_State_defined */

#ifdef Nettle_SHA3_224_event_handler_defined
  pike_set_prog_event_callback(Nettle_SHA3_224_event_handler);

#ifndef Nettle_SHA3_224_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Nettle_SHA3_224_gc_live_obj */

#endif /* Nettle_SHA3_224_event_handler_defined */
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA3_224_program=end_program();
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#ifdef Nettle_SHA3_224_program_fun_num_used
Nettle_SHA3_224_program_fun_num=
#endif
 add_program_constant("SHA3_224",Nettle_SHA3_224_program,0);

#endif /* class_Nettle_SHA3_224_defined */

#ifdef class_Nettle_SHA3_256_defined

#ifdef PROG_NETTLE_SHA3_256_ID
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  START_NEW_PROGRAM_ID(NETTLE_SHA3_256);
#else
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  start_new_program();

#endif /* PROG_NETTLE_SHA3_256_ID */
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA3_256_program = Pike_compiler->new_program;

#ifndef tObjImpl_NETTLE_SHA3_256

#undef tObjIs_NETTLE_SHA3_256
#define tObjIs_NETTLE_SHA3_256 "\3\1\177\0\0\26"

#undef tObjImpl_NETTLE_SHA3_256
#define tObjImpl_NETTLE_SHA3_256 "\3\0\177\0\0\26"

#endif /* tObjImpl_NETTLE_SHA3_256 */

#ifdef inherit_Nettle_Hash_Nettle_SHA3_256_defined
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA3_256_Nettle_Hash_inh_num = Pike_compiler->new_program->num_inherits;
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  low_inherit(Nettle_Hash_program, NULL, -1, 0, 0, NULL);
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA3_256_Nettle_Hash_inh_offset = Pike_compiler->new_program->inherits[Nettle_SHA3_256_Nettle_Hash_inh_num].identifier_level;

#endif /* inherit_Nettle_Hash_Nettle_SHA3_256_defined */

#ifdef class_Nettle_SHA3_256_State_defined

#ifdef PROG_NETTLE_SHA3_256_STATE_ID
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  START_NEW_PROGRAM_ID(NETTLE_SHA3_256_STATE);
#else
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  start_new_program();

#endif /* PROG_NETTLE_SHA3_256_STATE_ID */
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA3_256_State_program = Pike_compiler->new_program;

#ifndef tObjImpl_NETTLE_SHA3_256_STATE

#undef tObjIs_NETTLE_SHA3_256_STATE
#define tObjIs_NETTLE_SHA3_256_STATE "\3\1\177\0\0\27"

#undef tObjImpl_NETTLE_SHA3_256_STATE
#define tObjImpl_NETTLE_SHA3_256_STATE "\3\0\177\0\0\27"

#endif /* tObjImpl_NETTLE_SHA3_256_STATE */

#ifdef THIS_NETTLE_SHA3_256_STATE
  Nettle_SHA3_256_State_storage_offset = ADD_STORAGE(struct Nettle_SHA3_256_State_struct);
#endif /* THIS_NETTLE_SHA3_256_STATE */

#ifdef extra_Nettle_SHA3_256_State_defined
#line 40 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
/* Perform an inherit of the Hash.State class that our parent
       * contains via its inherit of Hash.
       */
struct program *parent_prog = Pike_compiler->previous->new_program;
struct object *parent_obj = Pike_compiler->previous->fake_object;
int parent_State_fun_num =
really_low_find_shared_string_identifier(module_strings[1] /* "State" */,
parent_prog,
SEE_PROTECTED|SEE_PRIVATE);
if (parent_State_fun_num >= 0) {
struct program *parent_State_prog =
low_program_from_function(parent_obj, parent_State_fun_num);
if (parent_State_prog) {
parent_State_fun_num =
really_low_reference_inherited_identifier(Pike_compiler->previous,
0, parent_State_fun_num);
low_inherit(parent_State_prog, 0,
parent_State_fun_num,
1 + 42, 0, NULL);
}
}
}


#endif /* extra_Nettle_SHA3_256_State_defined */

#ifdef Nettle_SHA3_256_State_event_handler_defined
  pike_set_prog_event_callback(Nettle_SHA3_256_State_event_handler);

#ifndef Nettle_SHA3_256_State_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Nettle_SHA3_256_State_gc_live_obj */

#endif /* Nettle_SHA3_256_State_event_handler_defined */
#line 34 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Pike_compiler->new_program->flags |= PROGRAM_NEEDS_PARENT|PROGRAM_USES_PARENT;
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA3_256_State_program=end_program();
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#ifdef Nettle_SHA3_256_State_program_fun_num_used
Nettle_SHA3_256_State_program_fun_num=
#endif
 add_program_constant("State",Nettle_SHA3_256_State_program,0);

#endif /* class_Nettle_SHA3_256_State_defined */

#ifdef Nettle_SHA3_256_event_handler_defined
  pike_set_prog_event_callback(Nettle_SHA3_256_event_handler);

#ifndef Nettle_SHA3_256_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Nettle_SHA3_256_gc_live_obj */

#endif /* Nettle_SHA3_256_event_handler_defined */
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA3_256_program=end_program();
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#ifdef Nettle_SHA3_256_program_fun_num_used
Nettle_SHA3_256_program_fun_num=
#endif
 add_program_constant("SHA3_256",Nettle_SHA3_256_program,0);

#endif /* class_Nettle_SHA3_256_defined */

#ifdef class_Nettle_SHA3_384_defined

#ifdef PROG_NETTLE_SHA3_384_ID
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  START_NEW_PROGRAM_ID(NETTLE_SHA3_384);
#else
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  start_new_program();

#endif /* PROG_NETTLE_SHA3_384_ID */
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA3_384_program = Pike_compiler->new_program;

#ifndef tObjImpl_NETTLE_SHA3_384

#undef tObjIs_NETTLE_SHA3_384
#define tObjIs_NETTLE_SHA3_384 "\3\1\177\0\0\30"

#undef tObjImpl_NETTLE_SHA3_384
#define tObjImpl_NETTLE_SHA3_384 "\3\0\177\0\0\30"

#endif /* tObjImpl_NETTLE_SHA3_384 */

#ifdef inherit_Nettle_Hash_Nettle_SHA3_384_defined
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA3_384_Nettle_Hash_inh_num = Pike_compiler->new_program->num_inherits;
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  low_inherit(Nettle_Hash_program, NULL, -1, 0, 0, NULL);
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA3_384_Nettle_Hash_inh_offset = Pike_compiler->new_program->inherits[Nettle_SHA3_384_Nettle_Hash_inh_num].identifier_level;

#endif /* inherit_Nettle_Hash_Nettle_SHA3_384_defined */

#ifdef class_Nettle_SHA3_384_State_defined

#ifdef PROG_NETTLE_SHA3_384_STATE_ID
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  START_NEW_PROGRAM_ID(NETTLE_SHA3_384_STATE);
#else
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  start_new_program();

#endif /* PROG_NETTLE_SHA3_384_STATE_ID */
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA3_384_State_program = Pike_compiler->new_program;

#ifndef tObjImpl_NETTLE_SHA3_384_STATE

#undef tObjIs_NETTLE_SHA3_384_STATE
#define tObjIs_NETTLE_SHA3_384_STATE "\3\1\177\0\0\31"

#undef tObjImpl_NETTLE_SHA3_384_STATE
#define tObjImpl_NETTLE_SHA3_384_STATE "\3\0\177\0\0\31"

#endif /* tObjImpl_NETTLE_SHA3_384_STATE */

#ifdef THIS_NETTLE_SHA3_384_STATE
  Nettle_SHA3_384_State_storage_offset = ADD_STORAGE(struct Nettle_SHA3_384_State_struct);
#endif /* THIS_NETTLE_SHA3_384_STATE */

#ifdef extra_Nettle_SHA3_384_State_defined
#line 40 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
/* Perform an inherit of the Hash.State class that our parent
       * contains via its inherit of Hash.
       */
struct program *parent_prog = Pike_compiler->previous->new_program;
struct object *parent_obj = Pike_compiler->previous->fake_object;
int parent_State_fun_num =
really_low_find_shared_string_identifier(module_strings[1] /* "State" */,
parent_prog,
SEE_PROTECTED|SEE_PRIVATE);
if (parent_State_fun_num >= 0) {
struct program *parent_State_prog =
low_program_from_function(parent_obj, parent_State_fun_num);
if (parent_State_prog) {
parent_State_fun_num =
really_low_reference_inherited_identifier(Pike_compiler->previous,
0, parent_State_fun_num);
low_inherit(parent_State_prog, 0,
parent_State_fun_num,
1 + 42, 0, NULL);
}
}
}


#endif /* extra_Nettle_SHA3_384_State_defined */

#ifdef Nettle_SHA3_384_State_event_handler_defined
  pike_set_prog_event_callback(Nettle_SHA3_384_State_event_handler);

#ifndef Nettle_SHA3_384_State_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Nettle_SHA3_384_State_gc_live_obj */

#endif /* Nettle_SHA3_384_State_event_handler_defined */
#line 34 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Pike_compiler->new_program->flags |= PROGRAM_NEEDS_PARENT|PROGRAM_USES_PARENT;
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA3_384_State_program=end_program();
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#ifdef Nettle_SHA3_384_State_program_fun_num_used
Nettle_SHA3_384_State_program_fun_num=
#endif
 add_program_constant("State",Nettle_SHA3_384_State_program,0);

#endif /* class_Nettle_SHA3_384_State_defined */

#ifdef Nettle_SHA3_384_event_handler_defined
  pike_set_prog_event_callback(Nettle_SHA3_384_event_handler);

#ifndef Nettle_SHA3_384_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Nettle_SHA3_384_gc_live_obj */

#endif /* Nettle_SHA3_384_event_handler_defined */
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA3_384_program=end_program();
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#ifdef Nettle_SHA3_384_program_fun_num_used
Nettle_SHA3_384_program_fun_num=
#endif
 add_program_constant("SHA3_384",Nettle_SHA3_384_program,0);

#endif /* class_Nettle_SHA3_384_defined */

#ifdef class_Nettle_SHA3_512_defined

#ifdef PROG_NETTLE_SHA3_512_ID
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  START_NEW_PROGRAM_ID(NETTLE_SHA3_512);
#else
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  start_new_program();

#endif /* PROG_NETTLE_SHA3_512_ID */
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA3_512_program = Pike_compiler->new_program;

#ifndef tObjImpl_NETTLE_SHA3_512

#undef tObjIs_NETTLE_SHA3_512
#define tObjIs_NETTLE_SHA3_512 "\3\1\177\0\0\32"

#undef tObjImpl_NETTLE_SHA3_512
#define tObjImpl_NETTLE_SHA3_512 "\3\0\177\0\0\32"

#endif /* tObjImpl_NETTLE_SHA3_512 */

#ifdef inherit_Nettle_Hash_Nettle_SHA3_512_defined
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA3_512_Nettle_Hash_inh_num = Pike_compiler->new_program->num_inherits;
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  low_inherit(Nettle_Hash_program, NULL, -1, 0, 0, NULL);
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA3_512_Nettle_Hash_inh_offset = Pike_compiler->new_program->inherits[Nettle_SHA3_512_Nettle_Hash_inh_num].identifier_level;

#endif /* inherit_Nettle_Hash_Nettle_SHA3_512_defined */

#ifdef class_Nettle_SHA3_512_State_defined

#ifdef PROG_NETTLE_SHA3_512_STATE_ID
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  START_NEW_PROGRAM_ID(NETTLE_SHA3_512_STATE);
#else
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  start_new_program();

#endif /* PROG_NETTLE_SHA3_512_STATE_ID */
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA3_512_State_program = Pike_compiler->new_program;

#ifndef tObjImpl_NETTLE_SHA3_512_STATE

#undef tObjIs_NETTLE_SHA3_512_STATE
#define tObjIs_NETTLE_SHA3_512_STATE "\3\1\177\0\0\33"

#undef tObjImpl_NETTLE_SHA3_512_STATE
#define tObjImpl_NETTLE_SHA3_512_STATE "\3\0\177\0\0\33"

#endif /* tObjImpl_NETTLE_SHA3_512_STATE */

#ifdef THIS_NETTLE_SHA3_512_STATE
  Nettle_SHA3_512_State_storage_offset = ADD_STORAGE(struct Nettle_SHA3_512_State_struct);
#endif /* THIS_NETTLE_SHA3_512_STATE */

#ifdef extra_Nettle_SHA3_512_State_defined
#line 40 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
/* Perform an inherit of the Hash.State class that our parent
       * contains via its inherit of Hash.
       */
struct program *parent_prog = Pike_compiler->previous->new_program;
struct object *parent_obj = Pike_compiler->previous->fake_object;
int parent_State_fun_num =
really_low_find_shared_string_identifier(module_strings[1] /* "State" */,
parent_prog,
SEE_PROTECTED|SEE_PRIVATE);
if (parent_State_fun_num >= 0) {
struct program *parent_State_prog =
low_program_from_function(parent_obj, parent_State_fun_num);
if (parent_State_prog) {
parent_State_fun_num =
really_low_reference_inherited_identifier(Pike_compiler->previous,
0, parent_State_fun_num);
low_inherit(parent_State_prog, 0,
parent_State_fun_num,
1 + 42, 0, NULL);
}
}
}


#endif /* extra_Nettle_SHA3_512_State_defined */

#ifdef Nettle_SHA3_512_State_event_handler_defined
  pike_set_prog_event_callback(Nettle_SHA3_512_State_event_handler);

#ifndef Nettle_SHA3_512_State_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Nettle_SHA3_512_State_gc_live_obj */

#endif /* Nettle_SHA3_512_State_event_handler_defined */
#line 34 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Pike_compiler->new_program->flags |= PROGRAM_NEEDS_PARENT|PROGRAM_USES_PARENT;
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA3_512_State_program=end_program();
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#ifdef Nettle_SHA3_512_State_program_fun_num_used
Nettle_SHA3_512_State_program_fun_num=
#endif
 add_program_constant("State",Nettle_SHA3_512_State_program,0);

#endif /* class_Nettle_SHA3_512_State_defined */

#ifdef Nettle_SHA3_512_event_handler_defined
  pike_set_prog_event_callback(Nettle_SHA3_512_event_handler);

#ifndef Nettle_SHA3_512_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Nettle_SHA3_512_gc_live_obj */

#endif /* Nettle_SHA3_512_event_handler_defined */
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_SHA3_512_program=end_program();
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#ifdef Nettle_SHA3_512_program_fun_num_used
Nettle_SHA3_512_program_fun_num=
#endif
 add_program_constant("SHA3_512",Nettle_SHA3_512_program,0);

#endif /* class_Nettle_SHA3_512_defined */

#ifdef class_Nettle_RIPEMD160_defined

#ifdef PROG_NETTLE_RIPEMD160_ID
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  START_NEW_PROGRAM_ID(NETTLE_RIPEMD160);
#else
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  start_new_program();

#endif /* PROG_NETTLE_RIPEMD160_ID */
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_RIPEMD160_program = Pike_compiler->new_program;

#ifndef tObjImpl_NETTLE_RIPEMD160

#undef tObjIs_NETTLE_RIPEMD160
#define tObjIs_NETTLE_RIPEMD160 "\3\1\177\0\0\34"

#undef tObjImpl_NETTLE_RIPEMD160
#define tObjImpl_NETTLE_RIPEMD160 "\3\0\177\0\0\34"

#endif /* tObjImpl_NETTLE_RIPEMD160 */

#ifdef inherit_Nettle_Hash_Nettle_RIPEMD160_defined
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_RIPEMD160_Nettle_Hash_inh_num = Pike_compiler->new_program->num_inherits;
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  low_inherit(Nettle_Hash_program, NULL, -1, 0, 0, NULL);
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_RIPEMD160_Nettle_Hash_inh_offset = Pike_compiler->new_program->inherits[Nettle_RIPEMD160_Nettle_Hash_inh_num].identifier_level;

#endif /* inherit_Nettle_Hash_Nettle_RIPEMD160_defined */

#ifdef class_Nettle_RIPEMD160_State_defined

#ifdef PROG_NETTLE_RIPEMD160_STATE_ID
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  START_NEW_PROGRAM_ID(NETTLE_RIPEMD160_STATE);
#else
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  start_new_program();

#endif /* PROG_NETTLE_RIPEMD160_STATE_ID */
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_RIPEMD160_State_program = Pike_compiler->new_program;

#ifndef tObjImpl_NETTLE_RIPEMD160_STATE

#undef tObjIs_NETTLE_RIPEMD160_STATE
#define tObjIs_NETTLE_RIPEMD160_STATE "\3\1\177\0\0\35"

#undef tObjImpl_NETTLE_RIPEMD160_STATE
#define tObjImpl_NETTLE_RIPEMD160_STATE "\3\0\177\0\0\35"

#endif /* tObjImpl_NETTLE_RIPEMD160_STATE */

#ifdef THIS_NETTLE_RIPEMD160_STATE
  Nettle_RIPEMD160_State_storage_offset = ADD_STORAGE(struct Nettle_RIPEMD160_State_struct);
#endif /* THIS_NETTLE_RIPEMD160_STATE */

#ifdef extra_Nettle_RIPEMD160_State_defined
#line 40 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
/* Perform an inherit of the Hash.State class that our parent
       * contains via its inherit of Hash.
       */
struct program *parent_prog = Pike_compiler->previous->new_program;
struct object *parent_obj = Pike_compiler->previous->fake_object;
int parent_State_fun_num =
really_low_find_shared_string_identifier(module_strings[1] /* "State" */,
parent_prog,
SEE_PROTECTED|SEE_PRIVATE);
if (parent_State_fun_num >= 0) {
struct program *parent_State_prog =
low_program_from_function(parent_obj, parent_State_fun_num);
if (parent_State_prog) {
parent_State_fun_num =
really_low_reference_inherited_identifier(Pike_compiler->previous,
0, parent_State_fun_num);
low_inherit(parent_State_prog, 0,
parent_State_fun_num,
1 + 42, 0, NULL);
}
}
}


#endif /* extra_Nettle_RIPEMD160_State_defined */

#ifdef Nettle_RIPEMD160_State_event_handler_defined
  pike_set_prog_event_callback(Nettle_RIPEMD160_State_event_handler);

#ifndef Nettle_RIPEMD160_State_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Nettle_RIPEMD160_State_gc_live_obj */

#endif /* Nettle_RIPEMD160_State_event_handler_defined */
#line 34 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Pike_compiler->new_program->flags |= PROGRAM_NEEDS_PARENT|PROGRAM_USES_PARENT;
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_RIPEMD160_State_program=end_program();
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#ifdef Nettle_RIPEMD160_State_program_fun_num_used
Nettle_RIPEMD160_State_program_fun_num=
#endif
 add_program_constant("State",Nettle_RIPEMD160_State_program,0);

#endif /* class_Nettle_RIPEMD160_State_defined */

#ifdef Nettle_RIPEMD160_event_handler_defined
  pike_set_prog_event_callback(Nettle_RIPEMD160_event_handler);

#ifndef Nettle_RIPEMD160_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Nettle_RIPEMD160_gc_live_obj */

#endif /* Nettle_RIPEMD160_event_handler_defined */
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_RIPEMD160_program=end_program();
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#ifdef Nettle_RIPEMD160_program_fun_num_used
Nettle_RIPEMD160_program_fun_num=
#endif
 add_program_constant("RIPEMD160",Nettle_RIPEMD160_program,0);

#endif /* class_Nettle_RIPEMD160_defined */

#ifdef class_Nettle_GOST94_defined

#ifdef PROG_NETTLE_GOST94_ID
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  START_NEW_PROGRAM_ID(NETTLE_GOST94);
#else
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  start_new_program();

#endif /* PROG_NETTLE_GOST94_ID */
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_GOST94_program = Pike_compiler->new_program;

#ifndef tObjImpl_NETTLE_GOST94

#undef tObjIs_NETTLE_GOST94
#define tObjIs_NETTLE_GOST94 "\3\1\177\0\0\36"

#undef tObjImpl_NETTLE_GOST94
#define tObjImpl_NETTLE_GOST94 "\3\0\177\0\0\36"

#endif /* tObjImpl_NETTLE_GOST94 */

#ifdef inherit_Nettle_Hash_Nettle_GOST94_defined
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_GOST94_Nettle_Hash_inh_num = Pike_compiler->new_program->num_inherits;
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  low_inherit(Nettle_Hash_program, NULL, -1, 0, 0, NULL);
#line 15 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_GOST94_Nettle_Hash_inh_offset = Pike_compiler->new_program->inherits[Nettle_GOST94_Nettle_Hash_inh_num].identifier_level;

#endif /* inherit_Nettle_Hash_Nettle_GOST94_defined */

#ifdef class_Nettle_GOST94_State_defined

#ifdef PROG_NETTLE_GOST94_STATE_ID
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  START_NEW_PROGRAM_ID(NETTLE_GOST94_STATE);
#else
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  start_new_program();

#endif /* PROG_NETTLE_GOST94_STATE_ID */
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_GOST94_State_program = Pike_compiler->new_program;

#ifndef tObjImpl_NETTLE_GOST94_STATE

#undef tObjIs_NETTLE_GOST94_STATE
#define tObjIs_NETTLE_GOST94_STATE "\3\1\177\0\0\37"

#undef tObjImpl_NETTLE_GOST94_STATE
#define tObjImpl_NETTLE_GOST94_STATE "\3\0\177\0\0\37"

#endif /* tObjImpl_NETTLE_GOST94_STATE */

#ifdef THIS_NETTLE_GOST94_STATE
  Nettle_GOST94_State_storage_offset = ADD_STORAGE(struct Nettle_GOST94_State_struct);
#endif /* THIS_NETTLE_GOST94_STATE */

#ifdef extra_Nettle_GOST94_State_defined
#line 40 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
{
/* Perform an inherit of the Hash.State class that our parent
       * contains via its inherit of Hash.
       */
struct program *parent_prog = Pike_compiler->previous->new_program;
struct object *parent_obj = Pike_compiler->previous->fake_object;
int parent_State_fun_num =
really_low_find_shared_string_identifier(module_strings[1] /* "State" */,
parent_prog,
SEE_PROTECTED|SEE_PRIVATE);
if (parent_State_fun_num >= 0) {
struct program *parent_State_prog =
low_program_from_function(parent_obj, parent_State_fun_num);
if (parent_State_prog) {
parent_State_fun_num =
really_low_reference_inherited_identifier(Pike_compiler->previous,
0, parent_State_fun_num);
low_inherit(parent_State_prog, 0,
parent_State_fun_num,
1 + 42, 0, NULL);
}
}
}


#endif /* extra_Nettle_GOST94_State_defined */

#ifdef Nettle_GOST94_State_event_handler_defined
  pike_set_prog_event_callback(Nettle_GOST94_State_event_handler);

#ifndef Nettle_GOST94_State_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Nettle_GOST94_State_gc_live_obj */

#endif /* Nettle_GOST94_State_event_handler_defined */
#line 34 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Pike_compiler->new_program->flags |= PROGRAM_NEEDS_PARENT|PROGRAM_USES_PARENT;
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_GOST94_State_program=end_program();
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#ifdef Nettle_GOST94_State_program_fun_num_used
Nettle_GOST94_State_program_fun_num=
#endif
 add_program_constant("State",Nettle_GOST94_State_program,0);

#endif /* class_Nettle_GOST94_State_defined */

#ifdef Nettle_GOST94_event_handler_defined
  pike_set_prog_event_callback(Nettle_GOST94_event_handler);

#ifndef Nettle_GOST94_gc_live_obj
  Pike_compiler->new_program->flags &= ~PROGRAM_LIVE_OBJ;

#endif /* Nettle_GOST94_gc_live_obj */

#endif /* Nettle_GOST94_event_handler_defined */
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
  Nettle_GOST94_program=end_program();
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.H"
#ifdef Nettle_GOST94_program_fun_num_used
Nettle_GOST94_program_fun_num=
#endif
 add_program_constant("GOST94",Nettle_GOST94_program,0);

#endif /* class_Nettle_GOST94_defined */

#ifdef CMOD_MAP_PROGRAM_IDS_DEFINED
set_program_id_to_id( 0 );
#endif /* CMOD_MAP_PROGRAM_IDS_DEFINED */
#line 731 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
;
}

void
hash_exit(void)
{
werror("Nettle, hash exit\n");

#ifdef class_Nettle_Hash_defined

#ifdef class_Nettle_Hash_State_defined
  if(Nettle_Hash_State_program) {
#line 467 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    free_program(Nettle_Hash_State_program);
    Nettle_Hash_State_program=0;
  }

#endif /* class_Nettle_Hash_State_defined */
  if(Nettle_Hash_program) {
#line 53 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    free_program(Nettle_Hash_program);
    Nettle_Hash_program=0;
  }

#endif /* class_Nettle_Hash_defined */

#ifdef class_Nettle_MD5_defined

#ifdef class_Nettle_MD5_State_defined
  if(Nettle_MD5_State_program) {
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    free_program(Nettle_MD5_State_program);
    Nettle_MD5_State_program=0;
  }

#endif /* class_Nettle_MD5_State_defined */
  if(Nettle_MD5_program) {
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    free_program(Nettle_MD5_program);
    Nettle_MD5_program=0;
  }

#endif /* class_Nettle_MD5_defined */

#ifdef class_Nettle_MD4_defined

#ifdef class_Nettle_MD4_State_defined
  if(Nettle_MD4_State_program) {
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    free_program(Nettle_MD4_State_program);
    Nettle_MD4_State_program=0;
  }

#endif /* class_Nettle_MD4_State_defined */
  if(Nettle_MD4_program) {
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    free_program(Nettle_MD4_program);
    Nettle_MD4_program=0;
  }

#endif /* class_Nettle_MD4_defined */

#ifdef class_Nettle_MD2_defined

#ifdef class_Nettle_MD2_State_defined
  if(Nettle_MD2_State_program) {
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    free_program(Nettle_MD2_State_program);
    Nettle_MD2_State_program=0;
  }

#endif /* class_Nettle_MD2_State_defined */
  if(Nettle_MD2_program) {
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    free_program(Nettle_MD2_program);
    Nettle_MD2_program=0;
  }

#endif /* class_Nettle_MD2_defined */

#ifdef class_Nettle_SHA1_defined

#ifdef class_Nettle_SHA1_State_defined
  if(Nettle_SHA1_State_program) {
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    free_program(Nettle_SHA1_State_program);
    Nettle_SHA1_State_program=0;
  }

#endif /* class_Nettle_SHA1_State_defined */
  if(Nettle_SHA1_program) {
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    free_program(Nettle_SHA1_program);
    Nettle_SHA1_program=0;
  }

#endif /* class_Nettle_SHA1_defined */

#ifdef class_Nettle_SHA224_defined

#ifdef class_Nettle_SHA224_State_defined
  if(Nettle_SHA224_State_program) {
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    free_program(Nettle_SHA224_State_program);
    Nettle_SHA224_State_program=0;
  }

#endif /* class_Nettle_SHA224_State_defined */
  if(Nettle_SHA224_program) {
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    free_program(Nettle_SHA224_program);
    Nettle_SHA224_program=0;
  }

#endif /* class_Nettle_SHA224_defined */

#ifdef class_Nettle_SHA256_defined

#ifdef class_Nettle_SHA256_State_defined
  if(Nettle_SHA256_State_program) {
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    free_program(Nettle_SHA256_State_program);
    Nettle_SHA256_State_program=0;
  }

#endif /* class_Nettle_SHA256_State_defined */
  if(Nettle_SHA256_program) {
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    free_program(Nettle_SHA256_program);
    Nettle_SHA256_program=0;
  }

#endif /* class_Nettle_SHA256_defined */

#ifdef class_Nettle_SHA384_defined

#ifdef class_Nettle_SHA384_State_defined
  if(Nettle_SHA384_State_program) {
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    free_program(Nettle_SHA384_State_program);
    Nettle_SHA384_State_program=0;
  }

#endif /* class_Nettle_SHA384_State_defined */
  if(Nettle_SHA384_program) {
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    free_program(Nettle_SHA384_program);
    Nettle_SHA384_program=0;
  }

#endif /* class_Nettle_SHA384_defined */

#ifdef class_Nettle_SHA512_defined

#ifdef class_Nettle_SHA512_State_defined
  if(Nettle_SHA512_State_program) {
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    free_program(Nettle_SHA512_State_program);
    Nettle_SHA512_State_program=0;
  }

#endif /* class_Nettle_SHA512_State_defined */
  if(Nettle_SHA512_program) {
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    free_program(Nettle_SHA512_program);
    Nettle_SHA512_program=0;
  }

#endif /* class_Nettle_SHA512_defined */

#ifdef class_Nettle_SHA3_224_defined

#ifdef class_Nettle_SHA3_224_State_defined
  if(Nettle_SHA3_224_State_program) {
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    free_program(Nettle_SHA3_224_State_program);
    Nettle_SHA3_224_State_program=0;
  }

#endif /* class_Nettle_SHA3_224_State_defined */
  if(Nettle_SHA3_224_program) {
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    free_program(Nettle_SHA3_224_program);
    Nettle_SHA3_224_program=0;
  }

#endif /* class_Nettle_SHA3_224_defined */

#ifdef class_Nettle_SHA3_256_defined

#ifdef class_Nettle_SHA3_256_State_defined
  if(Nettle_SHA3_256_State_program) {
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    free_program(Nettle_SHA3_256_State_program);
    Nettle_SHA3_256_State_program=0;
  }

#endif /* class_Nettle_SHA3_256_State_defined */
  if(Nettle_SHA3_256_program) {
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    free_program(Nettle_SHA3_256_program);
    Nettle_SHA3_256_program=0;
  }

#endif /* class_Nettle_SHA3_256_defined */

#ifdef class_Nettle_SHA3_384_defined

#ifdef class_Nettle_SHA3_384_State_defined
  if(Nettle_SHA3_384_State_program) {
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    free_program(Nettle_SHA3_384_State_program);
    Nettle_SHA3_384_State_program=0;
  }

#endif /* class_Nettle_SHA3_384_State_defined */
  if(Nettle_SHA3_384_program) {
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    free_program(Nettle_SHA3_384_program);
    Nettle_SHA3_384_program=0;
  }

#endif /* class_Nettle_SHA3_384_defined */

#ifdef class_Nettle_SHA3_512_defined

#ifdef class_Nettle_SHA3_512_State_defined
  if(Nettle_SHA3_512_State_program) {
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    free_program(Nettle_SHA3_512_State_program);
    Nettle_SHA3_512_State_program=0;
  }

#endif /* class_Nettle_SHA3_512_State_defined */
  if(Nettle_SHA3_512_program) {
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    free_program(Nettle_SHA3_512_program);
    Nettle_SHA3_512_program=0;
  }

#endif /* class_Nettle_SHA3_512_defined */

#ifdef class_Nettle_RIPEMD160_defined

#ifdef class_Nettle_RIPEMD160_State_defined
  if(Nettle_RIPEMD160_State_program) {
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    free_program(Nettle_RIPEMD160_State_program);
    Nettle_RIPEMD160_State_program=0;
  }

#endif /* class_Nettle_RIPEMD160_State_defined */
  if(Nettle_RIPEMD160_program) {
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    free_program(Nettle_RIPEMD160_program);
    Nettle_RIPEMD160_program=0;
  }

#endif /* class_Nettle_RIPEMD160_defined */

#ifdef class_Nettle_GOST94_defined

#ifdef class_Nettle_GOST94_State_defined
  if(Nettle_GOST94_State_program) {
#line 33 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    free_program(Nettle_GOST94_State_program);
    Nettle_GOST94_State_program=0;
  }

#endif /* class_Nettle_GOST94_State_defined */
  if(Nettle_GOST94_program) {
#line 11 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
    free_program(Nettle_GOST94_program);
    Nettle_GOST94_program=0;
  }

#endif /* class_Nettle_GOST94_defined */

#ifdef module_strings_declared
{
  int i;
  for(i=0; i < 3; i++) {
    if (module_strings[i]) free_string(module_strings[i]);
    module_strings[i] = NULL;
  }
}
#endif
#line 738 "/Users/hww3/devel/pike/src/post_modules/Nettle/hash.cmod"
;
}

#endif /* HAVE_LIBNETTLE */


#ifdef CMOD_MAP_PROGRAM_IDS_DEFINED
static int ___cmod_map_program_ids(int id)
{
  int i = 0;
  if( (id&0x7f000000) != 0x7f000000 ) return id;
  id = id&0x00ffffff;
#ifdef class_Nettle_SHA384_State_defined
if(id==17) return Nettle_SHA384_State_program->id;
#endif
#ifdef class_Nettle_SHA384_defined
if(id==16) return Nettle_SHA384_program->id;
#endif
#ifdef class_Nettle_SHA512_State_defined
if(id==19) return Nettle_SHA512_State_program->id;
#endif
#ifdef class_Nettle_Hash_defined
if(id==2) return Nettle_Hash_program->id;
#endif
#ifdef class_Nettle_SHA512_defined
if(id==18) return Nettle_SHA512_program->id;
#endif
#ifdef class_Nettle_Hash_State_defined
if(id==3) return Nettle_Hash_State_program->id;
#endif
#ifdef class_Nettle_SHA3_224_State_defined
if(id==21) return Nettle_SHA3_224_State_program->id;
#endif
#ifdef class_Nettle_MD5_defined
if(id==4) return Nettle_MD5_program->id;
#endif
#ifdef class_Nettle_SHA3_224_defined
if(id==20) return Nettle_SHA3_224_program->id;
#endif
#ifdef class_Nettle_MD5_State_defined
if(id==5) return Nettle_MD5_State_program->id;
#endif
#ifdef class_Nettle_SHA3_256_State_defined
if(id==23) return Nettle_SHA3_256_State_program->id;
#endif
#ifdef class_Nettle_MD4_defined
if(id==6) return Nettle_MD4_program->id;
#endif
#ifdef class_Nettle_SHA3_256_defined
if(id==22) return Nettle_SHA3_256_program->id;
#endif
#ifdef class_Nettle_MD4_State_defined
if(id==7) return Nettle_MD4_State_program->id;
#endif
#ifdef class_Nettle_SHA3_384_State_defined
if(id==25) return Nettle_SHA3_384_State_program->id;
#endif
#ifdef class_Nettle_MD2_defined
if(id==8) return Nettle_MD2_program->id;
#endif
#ifdef class_Nettle_SHA3_384_defined
if(id==24) return Nettle_SHA3_384_program->id;
#endif
#ifdef class_Nettle_MD2_State_defined
if(id==9) return Nettle_MD2_State_program->id;
#endif
#ifdef class_Nettle_SHA3_512_State_defined
if(id==27) return Nettle_SHA3_512_State_program->id;
#endif
#ifdef class_Nettle_SHA1_defined
if(id==10) return Nettle_SHA1_program->id;
#endif
#ifdef class_Nettle_SHA3_512_defined
if(id==26) return Nettle_SHA3_512_program->id;
#endif
#ifdef class_Nettle_SHA1_State_defined
if(id==11) return Nettle_SHA1_State_program->id;
#endif
#ifdef class_Nettle_RIPEMD160_State_defined
if(id==29) return Nettle_RIPEMD160_State_program->id;
#endif
#ifdef class_Nettle_SHA224_defined
if(id==12) return Nettle_SHA224_program->id;
#endif
#ifdef class_Nettle_RIPEMD160_defined
if(id==28) return Nettle_RIPEMD160_program->id;
#endif
#ifdef class_Nettle_SHA224_State_defined
if(id==13) return Nettle_SHA224_State_program->id;
#endif
#ifdef class_Nettle_GOST94_State_defined
if(id==31) return Nettle_GOST94_State_program->id;
#endif
#ifdef class_Nettle_SHA256_defined
if(id==14) return Nettle_SHA256_program->id;
#endif
#ifdef class_Nettle_GOST94_defined
if(id==30) return Nettle_GOST94_program->id;
#endif
#ifdef class_Nettle_SHA256_State_defined
if(id==15) return Nettle_SHA256_State_program->id;
#endif
  return 0;
}
#endif /* CMOD_MAP_PROGRAM_IDS_DEFINED */
