Fixed metadata creation for win32 version.

Fixed creation of metadata with hmac 0x14.
Added ECDSA support and signature checks.
Improved hmac/cmac hash compare functions.