File: zsha1.h

package info (click to toggle)
libzia 4.36-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,320 kB
  • sloc: ansic: 24,172; sh: 4,408; makefile: 211
file content (27 lines) | stat: -rw-r--r-- 601 bytes parent folder | download | duplicates (4)
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
#ifndef __ZSHA1_H
#define __ZSHA1_H

#include <libziaint.h>

/*
   SHA-1 in C
   By Steve Reid <steve@edmweb.com>
   100% Public Domain
 */

#include "stdint.h"

typedef struct
{
    uint32_t state[5];
    uint32_t count[2];
    unsigned char buffer[64];
} zsha1_ctx;

void zsha1_transform(uint32_t state[5], const unsigned char buffer[64]);
void zsha1_init(zsha1_ctx * context);
void zsha1_update(zsha1_ctx * context, const unsigned char *data, uint32_t len);
void zsha1_final(unsigned char digest[20], zsha1_ctx * context);
void zsha1(char *hash_out, const char *str, int len);

#endif /* SHA1_H */