diff options
Diffstat (limited to 'mac.h')
-rw-r--r-- | mac.h | 30 |
1 files changed, 25 insertions, 5 deletions
@@ -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 | |||
31 | struct 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 | |||
26 | int mac_valid(const char *); | 43 | int mac_valid(const char *); |
27 | char *mac_alg_list(char); | 44 | char *mac_alg_list(char); |
28 | int mac_setup(Mac *, char *); | 45 | int mac_setup(struct sshmac *, char *); |
29 | int mac_init(Mac *); | 46 | int mac_init(struct sshmac *); |
30 | u_char *mac_compute(Mac *, u_int32_t, u_char *, int); | 47 | int mac_compute(struct sshmac *, u_int32_t, const u_char *, int, |
31 | void mac_clear(Mac *); | 48 | u_char *, size_t); |
49 | void mac_clear(struct sshmac *); | ||
50 | |||
51 | #endif /* SSHMAC_H */ | ||