1 /* LibTomCrypt, modular cryptographic library -- Tom St Denis
3 * LibTomCrypt is a library that provides various cryptographic
4 * algorithms in a highly modular and flexible manner.
6 * The library is free for all purposes without any express
12 @file pelican_memory.c
13 Pelican MAC, MAC a block of memory, by Tom St Denis
19 Pelican block of memory
20 @param key The key for the MAC
21 @param keylen The length of the key (octets)
22 @param in The input to MAC
23 @param inlen The length of the input (octets)
24 @param out [out] The output TAG
25 @return CRYPT_OK on success
27 int pelican_memory(const unsigned char *key, unsigned long keylen,
28 const unsigned char *in, unsigned long inlen,
34 pel = XMALLOC(sizeof(*pel));
39 if ((err = pelican_init(pel, key, keylen)) != CRYPT_OK) {
43 if ((err = pelican_process(pel, in ,inlen)) != CRYPT_OK) {
47 err = pelican_done(pel, out);
55 /* ref: $Format:%D$ */
56 /* git commit: $Format:%H$ */
57 /* commit time: $Format:%ai$ */