summaryrefslogtreecommitdiff
path: root/mac.h
diff options
context:
space:
mode:
Diffstat (limited to 'mac.h')
-rw-r--r--mac.h30
1 files changed, 25 insertions, 5 deletions
diff --git a/mac.h b/mac.h
index fbe18c463..e5f6b84d9 100644
--- a/mac.h
+++ b/mac.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: mac.h,v 1.8 2013/11/07 11:58:27 dtucker Exp $ */ 1/* $OpenBSD: mac.h,v 1.9 2015/01/13 19:31:40 markus Exp $ */
2/* 2/*
3 * Copyright (c) 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2001 Markus Friedl. All rights reserved.
4 * 4 *
@@ -23,9 +23,29 @@
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26#ifndef SSHMAC_H
27#define SSHMAC_H
28
29#include <sys/types.h>
30
31struct sshmac {
32 char *name;
33 int enabled;
34 u_int mac_len;
35 u_char *key;
36 u_int key_len;
37 int type;
38 int etm; /* Encrypt-then-MAC */
39 struct ssh_hmac_ctx *hmac_ctx;
40 struct umac_ctx *umac_ctx;
41};
42
26int mac_valid(const char *); 43int mac_valid(const char *);
27char *mac_alg_list(char); 44char *mac_alg_list(char);
28int mac_setup(Mac *, char *); 45int mac_setup(struct sshmac *, char *);
29int mac_init(Mac *); 46int mac_init(struct sshmac *);
30u_char *mac_compute(Mac *, u_int32_t, u_char *, int); 47int mac_compute(struct sshmac *, u_int32_t, const u_char *, int,
31void mac_clear(Mac *); 48 u_char *, size_t);
49void mac_clear(struct sshmac *);
50
51#endif /* SSHMAC_H */