MOXA linux-2.6.x / linux-2.6.9-uc0 from sdlinux-moxaart.tgz
[linux-2.6.9-moxart.git] / drivers / char / mxhwenp / include / mxhw_crypto_wrapper.h
blob87e186c0ea67b398be86b2974fe9c8f3b39c322d
1 #ifndef _MXHW_CRYPTO_WRAPPER
2 #define _MXHW_CRYPTO_WRAPPER
4 #include <mxhw_crypto.h>
6 #define HWACC_PKTLEN_MIN 64
7 #define HWACC_PKTLEN_MIN_DES 160
9 typedef struct _SSNTAB
11 u_int flag;
12 u_int blen:16;
13 u_int klen:16;
14 short enId, deId; /* forward/inverse operation */
15 void *bkey; /* keys to a session */
16 u_char ukey[MAX_MXCIPHER_LEN_KEYS];
17 } SSNTAB;
19 SSNTAB* mxcrypto_create(const void *userKey, u_int klen, void *key, u_int blen, u_int is_aes);
20 int mxcrypto_perfrom(u_int algo, u_int mode, const u_char *input, u_char *output, u_long length,
21 void *key1, void *key2, void *key3, void *ivec, u_int num, int enc);
22 int mxcrypto_close(void *key);
23 void mxcrypto_set_software(int sw);
25 #endif