Patrick Welche <prlw1@cam.ac.uk>
[netbsd-mini2440.git] / external / bsd / ntp / dist / sntp / crypto.h
blob0448e5b5cc1df844cec0e47064ed8eb2d08c9b5f
1 /* $NetBSD$ */
3 #ifndef CRYPTO_H
4 #define CRYPTO_H
6 #include <string.h>
7 #include <stdio.h>
8 #include <stdlib.h>
10 #include <ntp_fp.h>
11 #include <ntp.h>
12 #include <ntp_md5.h>
13 #include <ntp_stdlib.h>
15 #include "utilities.h"
16 #include "sntp-opts.h"
18 #define LEN_PKT_MAC LEN_PKT_NOMAC + sizeof(u_int32)
20 /* #include "sntp-opts.h" */
22 struct key {
23 int key_id;
24 int key_len;
25 char type;
26 char key_seq[16];
27 struct key *next;
30 int auth_md5(char *pkt_data, int mac_size, struct key *cmp_key);
31 int auth_init(const char *keyfile, struct key **keys);
32 void get_key(int key_id, struct key **d_key);
35 #endif