crypto.h 846 B

123456789101112131415161718192021222324252627282930313233343536
  1. /*
  2. * AppArmor security module
  3. *
  4. * This file contains AppArmor policy loading interface function definitions.
  5. *
  6. * Copyright 2013 Canonical Ltd.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation, version 2 of the
  11. * License.
  12. */
  13. #ifndef __APPARMOR_CRYPTO_H
  14. #define __APPARMOR_CRYPTO_H
  15. #include "policy.h"
  16. #ifdef CONFIG_SECURITY_APPARMOR_HASH
  17. unsigned int aa_hash_size(void);
  18. int aa_calc_profile_hash(struct aa_profile *profile, u32 version, void *start,
  19. size_t len);
  20. #else
  21. static inline int aa_calc_profile_hash(struct aa_profile *profile, u32 version,
  22. void *start, size_t len)
  23. {
  24. return 0;
  25. }
  26. static inline unsigned int aa_hash_size(void)
  27. {
  28. return 0;
  29. }
  30. #endif
  31. #endif /* __APPARMOR_CRYPTO_H */