0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef __APPARMOR_CRYPTO_H
0011 #define __APPARMOR_CRYPTO_H
0012
0013 #include "policy.h"
0014
0015 #ifdef CONFIG_SECURITY_APPARMOR_HASH
0016 unsigned int aa_hash_size(void);
0017 char *aa_calc_hash(void *data, size_t len);
0018 int aa_calc_profile_hash(struct aa_profile *profile, u32 version, void *start,
0019 size_t len);
0020 #else
0021 static inline char *aa_calc_hash(void *data, size_t len)
0022 {
0023 return NULL;
0024 }
0025 static inline int aa_calc_profile_hash(struct aa_profile *profile, u32 version,
0026 void *start, size_t len)
0027 {
0028 return 0;
0029 }
0030
0031 static inline unsigned int aa_hash_size(void)
0032 {
0033 return 0;
0034 }
0035 #endif
0036
0037 #endif