#ifndef __MACCOMP_H__
#define __MACCOMP_H__

#include "fullSpec.h"

int encryptBlock (unsigned char *result, cipherInstance * cipherInst,
	      keyInstance * keyInst, unsigned char *plaintext);
int computeMac (unsigned char *result, int resLen, unsigned char *data,
	    unsigned int dataLen, unsigned char *key);
int validateMac (unsigned char *reference, int referenceLen, unsigned char *data,
	     unsigned int dataLen, unsigned char *key);

extern int blockEncrypt (cipherInstance * cipher, keyInstance * key,
		  BYTE * input, int inputLen, BYTE * outBuffer);
extern int makeKeyBinary (keyInstance * keyInst, BYTE direction,
	       unsigned char *cipherKey);
extern int computeHash (unsigned char *result, int resLen, unsigned char *data,
	     unsigned int dataLen);

#endif /* __MACCOMP_H__ */