File: kernelcryptoapi.h

package info (click to toggle)
btcheck 2.1-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 776 kB
  • sloc: sh: 3,925; ansic: 1,771; makefile: 12
file content (39 lines) | stat: -rw-r--r-- 774 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
31
32
33
34
35
36
37
38
39
/*
 * kernelcryptoapi.h
 *
 * $Id$
 *
 * This file is part of the btcheck project (c) 2008-2009 distributed
 * under the GNU GPLv3 license and created by Jean Diraison
 * <jean.diraison@ac-rennes.fr>
 *
 * URL: http://sourceforge.net/projects/btcheck/
 *
 */

#ifndef BTCHECK_KERNEL_CRYPTO_API_H_
#define BTCHECK_KERNEL_CRYPTO_API_H_

#include "config.h"

#ifdef WITH_KERNEL_CRYPTO_API

#include <sys/types.h>
#include <sys/socket.h>
#include <linux/if_alg.h>

typedef struct {
	struct sockaddr_alg sa;
	int safd;
	int fd;
} lkca_hash_ctx;

#define KCA_SHA1_DIGEST_LENGTH	20

int lkca_sha1_init(lkca_hash_ctx *ctx);
int lkca_sha1_update(lkca_hash_ctx *ctx, const void *data, unsigned long length);
int lkca_sha1_final(unsigned char *md, lkca_hash_ctx *ctx);

#endif

#endif