xref: /minix/external/bsd/bind/dist/lib/isc/include/isc/aes.h (revision bb9622b5)
1 /*	$NetBSD: aes.h,v 1.1.1.4 2014/12/10 03:34:44 christos Exp $	*/
2 
3 /*
4  * Copyright (C) 2014  Internet Systems Consortium, Inc. ("ISC")
5  *
6  * Permission to use, copy, modify, and/or distribute this software for any
7  * purpose with or without fee is hereby granted, provided that the above
8  * copyright notice and this permission notice appear in all copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
11  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
12  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
13  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
14  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
15  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16  * PERFORMANCE OF THIS SOFTWARE.
17  */
18 
19 /* Id */
20 
21 /*! \file isc/aes.h */
22 
23 #ifndef ISC_AES_H
24 #define ISC_AES_H 1
25 
26 #include <isc/lang.h>
27 #include <isc/platform.h>
28 #include <isc/types.h>
29 
30 #define ISC_AES128_KEYLENGTH 16U
31 #define ISC_AES192_KEYLENGTH 24U
32 #define ISC_AES256_KEYLENGTH 32U
33 #define ISC_AES_BLOCK_LENGTH 16U
34 
35 #ifdef ISC_PLATFORM_WANTAES
36 
37 ISC_LANG_BEGINDECLS
38 
39 void
40 isc_aes128_crypt(const unsigned char *key, const unsigned char *in,
41 		 unsigned char *out);
42 
43 void
44 isc_aes192_crypt(const unsigned char *key, const unsigned char *in,
45 		 unsigned char *out);
46 
47 void
48 isc_aes256_crypt(const unsigned char *key, const unsigned char *in,
49 		 unsigned char *out);
50 
51 ISC_LANG_ENDDECLS
52 
53 #endif /* ISC_PLATFORM_WANTAES */
54 
55 #endif /* ISC_AES_H */
56