added iOS source code
[wl-app.git] / iOS / Pods / SSZipArchive / SSZipArchive / minizip / aes / aes_ni.h
1 /*
2 Copyright (c) 1998-2013, Brian Gladman, Worcester, UK. All rights reserved.
3
4 The redistribution and use of this software (with or without changes)
5 is allowed without the payment of fees or royalties provided that:
6
7   source code distributions include the above copyright notice, this
8   list of conditions and the following disclaimer;
9
10   binary distributions include the above copyright notice, this list
11   of conditions and the following disclaimer in their documentation.
12
13 This software is provided 'as is' with no explicit or implied warranties
14 in respect of its operation, including, but not limited to, correctness
15 and fitness for purpose.
16 ---------------------------------------------------------------------------
17 Issue Date: 13/11/2013
18 */
19
20 #ifndef AES_NI_H
21 #define AES_NI_H
22
23 #define USE_AES_CONTEXT
24
25 #include "aesopt.h"
26
27 #if defined( USE_INTEL_AES_IF_PRESENT )
28
29 /* map names in C code to make them internal ('name' -> 'aes_name_i') */
30 #define aes_xi(x) aes_ ## x ## _i
31
32 /* map names here to provide the external API ('name' -> 'aes_name') */
33 #define aes_ni(x) aes_ ## x
34
35 AES_RETURN aes_ni(encrypt_key128)(const unsigned char *key, aes_encrypt_ctx cx[1]);
36 AES_RETURN aes_ni(encrypt_key192)(const unsigned char *key, aes_encrypt_ctx cx[1]);
37 AES_RETURN aes_ni(encrypt_key256)(const unsigned char *key, aes_encrypt_ctx cx[1]);
38
39 AES_RETURN aes_ni(decrypt_key128)(const unsigned char *key, aes_decrypt_ctx cx[1]);
40 AES_RETURN aes_ni(decrypt_key192)(const unsigned char *key, aes_decrypt_ctx cx[1]);
41 AES_RETURN aes_ni(decrypt_key256)(const unsigned char *key, aes_decrypt_ctx cx[1]);
42
43 AES_RETURN aes_ni(encrypt)(const unsigned char *in, unsigned char *out, const aes_encrypt_ctx cx[1]);
44 AES_RETURN aes_ni(decrypt)(const unsigned char *in, unsigned char *out, const aes_decrypt_ctx cx[1]);
45
46 AES_RETURN aes_xi(encrypt_key128)(const unsigned char *key, aes_encrypt_ctx cx[1]);
47 AES_RETURN aes_xi(encrypt_key192)(const unsigned char *key, aes_encrypt_ctx cx[1]);
48 AES_RETURN aes_xi(encrypt_key256)(const unsigned char *key, aes_encrypt_ctx cx[1]);
49
50 AES_RETURN aes_xi(decrypt_key128)(const unsigned char *key, aes_decrypt_ctx cx[1]);
51 AES_RETURN aes_xi(decrypt_key192)(const unsigned char *key, aes_decrypt_ctx cx[1]);
52 AES_RETURN aes_xi(decrypt_key256)(const unsigned char *key, aes_decrypt_ctx cx[1]);
53
54 AES_RETURN aes_xi(encrypt)(const unsigned char *in, unsigned char *out, const aes_encrypt_ctx cx[1]);
55 AES_RETURN aes_xi(decrypt)(const unsigned char *in, unsigned char *out, const aes_decrypt_ctx cx[1]);
56
57 #endif
58
59 #endif