Creating HMAC key in xmlsec:
------------------------------
xmlSecKeyPtr CreateHmacKey(const xmlSecByte * buf, xmlSecSize size)
{
xmlSecKeyPtr key;
xmlSecKeyDataPtr key_data;
int ret;
key = xmlSecKeyCreate();
if(!key) {
return (NULL);
}
key_data = xmlSecKeyEnsureData(key, xmlSecKeyDataHmacId);
if(!key_data) {
xmlSecKeyDestroy(key);
return (NULL);
}
ret = xmlSecOpenSSLKeyDataHmacSet(key_data, buf, size);
if(ret < 0) {
xmlSecKeyDestroy(key);
return (NULL);
}
return (key);
}
------------------------------
Best,
Aleksey
_______________________________________________
xmlsec mailing list
[EMAIL PROTECTED]
http://www.aleksey.com/mailman/listinfo/xmlsec