00001 #ifndef PRISM2_CRYPT_H
00002 #define PRISM2_CRYPT_H
00003
00004 struct hostap_crypto_ops {
00005 char *name;
00006
00007
00008
00009
00010 void * (*init)(void);
00011
00012
00013 void (*deinit)(void *priv);
00014
00015
00016
00017 int (*encrypt)(u8 *buf, int len, void *priv);
00018 int (*decrypt)(u8 *buf, int len, void *priv);
00019
00020 int (*set_key)(int idx, void *key, int len, void *priv);
00021 int (*get_key)(int idx, void *key, int len, void *priv);
00022
00023 int (*set_key_idx)(int idx, void *priv);
00024 int (*get_key_idx)(void *priv);
00025
00026
00027
00028
00029
00030
00031 int extra_prefix_len, extra_postfix_len;
00032 };
00033
00034
00035 int hostap_register_crypto_ops(struct hostap_crypto_ops *ops);
00036 int hostap_unregister_crypto_ops(struct hostap_crypto_ops *ops);
00037 struct hostap_crypto_ops * hostap_get_crypto_ops(const char *name);
00038
00039 #endif