File: chksum.h

package info (click to toggle)
slang2 2.3.3-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 11,488 kB
  • sloc: ansic: 101,756; sh: 3,435; makefile: 1,046; pascal: 440
file content (30 lines) | stat: -rw-r--r-- 1,056 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef SL_CHKSUM_H_
#define SL_CHKSUM_H_

typedef struct SLChksum_Type
{
   int (*accumulate)(struct SLChksum_Type *, unsigned char *, unsigned int);

   /* compute the digest and delete the object.  If the last argument is
    * non-zero, just delete the object.
    */
   int (*close)(struct SLChksum_Type *, unsigned char *, int);
   unsigned int digest_len;	       /* set by open */
   unsigned int buffer_size;           /* the buffer length */
   int close_will_push;		       /* if non-zero, the close method will push the result */
#ifdef CHKSUM_TYPE_PRIVATE_FIELDS
   /* private data */
   CHKSUM_TYPE_PRIVATE_FIELDS
#endif
}
SLChksum_Type;

extern SLChksum_Type *_pSLchksum_sha1_new (char *name);
extern SLChksum_Type *_pSLchksum_md5_new (char *name);
extern SLChksum_Type *_pSLchksum_crc8_new (char *name);
extern SLChksum_Type *_pSLchksum_crc16_new (char *name);
extern SLChksum_Type *_pSLchksum_crc32_new (char *name);
extern SLChksum_Type *_pSLchksum_sha256_new (char *name);
extern SLChksum_Type *_pSLchksum_sha512_new (char *name);
#endif