eax_addheader.c 671 B

12345678910111213141516171819202122232425
  1. /* LibTomCrypt, modular cryptographic library -- Tom St Denis
  2. *
  3. * LibTomCrypt is a library that provides various cryptographic
  4. * algorithms in a highly modular and flexible manner.
  5. *
  6. * The library is free for all purposes without any express
  7. * guarantee it works.
  8. *
  9. * Tom St Denis, [email protected], http://libtomcrypt.org
  10. */
  11. /* EAX Implementation by Tom St Denis */
  12. #include "mycrypt.h"
  13. #ifdef EAX_MODE
  14. /* add header (metadata) to the stream */
  15. int eax_addheader(eax_state *eax, const unsigned char *header, unsigned long length)
  16. {
  17. _ARGCHK(eax != NULL);
  18. _ARGCHK(header != NULL);
  19. return omac_process(&eax->headeromac, header, length);
  20. }
  21. #endif