Branch: Tag:

2003-03-18

2003-03-18 15:29:56 by Niels Möller <nisse@lysator.liu.se>

Fixed initialization check in MD5_Info and SHA1_Info. Autodoc fixes.

Rev: src/post_modules/Nettle/hash.cmod:1.3

1:   /* hash.cmod -*- c -*- */      #include "global.h" - RCSID("$Id: hash.cmod,v 1.2 2003/03/18 13:35:31 nisse Exp $"); + RCSID("$Id: hash.cmod,v 1.3 2003/03/18 15:29:56 nisse Exp $");   #include "interpret.h"   #include "svalue.h"   
37:   #define werror(x)   #endif    + /*! @module Nettle */ +    /*! @class HashInfo    *!    *! Represents information about a hash algorithm, such as
88:    }   }    + /*! @endclass HashInfo */ +    #define GET_META(o) \   ( ((struct HashInfo_struct *) get_storage((o), HashInfo_program)) \    ->meta)
182:    }   }    + /*! @endclass HashState */ +    /*! @class MD5_Info    *!    *! Internal mixin class, intended to be multiply inherited
197:       werror("MD5_Info->INIT\n");    -  if (HashInfo || !HashInfo->meta) +  if (HashInfo && !HashInfo->meta)    HashInfo->meta = &nettle_md5;    else    /* Can't call Pike_error here.
206:    }   }    + /*! @endclass MD5_Info */ +    /*! @class MD5_State    *!    *! State for MD5 hashing.
229:    instance->ctx = &THIS->md5;    }   } + /*! @endclass MD5_State */      /*! @class SHA1_Info    *!
245:       werror("SHA1_Info->INIT\n");    -  if (HashInfo || !HashInfo->meta) +  if (HashInfo && !HashInfo->meta)    HashInfo->meta = &nettle_sha1;    else    /* Can't call Pike_error here.
254:    }   }    + /*! @endclass SHA1_Info */ +    /*! @class SHA1_State    *!    *! State for SHA1 hashing.
278:    instance->ctx = &THIS->sha1;    }   } + /*! @endclass SHA1_State */    -  + /*! @endmodule Nettle */      void   hash_init(void)