1#ifndef CRYPTO_H 2#define CRYPTO_H 3 4#include <string.h> 5#include <stdio.h> 6#include <stdlib.h> 7 8#include <ntp_fp.h> 9#include <ntp.h> 10#include <ntp_md5.h> 11#include <ntp_stdlib.h> 12 13#include "utilities.h" 14#include "sntp-opts.h" 15 16#define LEN_PKT_MAC LEN_PKT_NOMAC + sizeof(u_int32) 17 18/* #include "sntp-opts.h" */ 19 20struct key { 21 int key_id; 22 int key_len; 23 char type; 24 char key_seq[16]; 25 struct key *next; 26}; 27 28int auth_md5(char *pkt_data, int mac_size, struct key *cmp_key); 29int auth_init(const char *keyfile, struct key **keys); 30void get_key(int key_id, struct key **d_key); 31 32 33#endif 34