Verify

This function implements a single-part signature or MAC verification operation without recovery. The return value indicates whether the signature or MAC was correct.

Synopsis

#include “fmciphobj.h”
int (*Verify)(struct CipherObj * ctx,
const void * sig, unsigned int slength,
const void * src, unsigned int length);
Parameter Description
ctx The address of a cipher object instance.
sig The address of the buffer containing the signature or the MAC.
slength Number of bytes in the sig buffer.
src Address of the buffer containing the input data.
length Number of bytes in the src buffer.

Return Value

0: The operation was successful.

Otherwise: an error occurred.

Comments

Most block cipher algorithm cipher objects do not implement this function.

This function finalizes the verification context. VerifyInit() must be called again to verify more data, even when the key is the same.