Logo Search packages:      
Sourcecode: libtomcrypt version File versions  Download package

int pelican_memory ( const unsigned char *  key,
unsigned long  keylen,
const unsigned char *  in,
unsigned long  inlen,
unsigned char *  out 

Pelican block of memory

keyThe key for the MAC
keylenThe length of the key (octets)
inThe input to MAC
inlenThe length of the input (octets)
out[out] The output TAG
CRYPT_OK on success

Definition at line 29 of file pelican_memory.c.

References pelican_done(), pelican_init(), and pelican_process().

   pelican_state *pel;
   int err;

   pel = XMALLOC(sizeof(*pel));
   if (pel == NULL) { 
      return CRYPT_MEM;

   if ((err = pelican_init(pel, key, keylen)) != CRYPT_OK) {
      return err;
   if ((err = pelican_process(pel, in ,inlen)) != CRYPT_OK) {
      return err;
   err = pelican_done(pel, out);
   return err;

Here is the call graph for this function:

Generated by  Doxygen 1.6.0   Back to index