of the HMAC. If it is NULL then the hash function is allocated and
the name of the hash algorithm is derived from the `name'. */
-bool silc_hmac_alloc(char *name, SilcHash hash, SilcHmac *new_hmac)
+bool silc_hmac_alloc(const char *name, SilcHash hash, SilcHmac *new_hmac)
{
SILC_LOG_DEBUG(("Allocating new HMAC"));
SilcUInt32 key_len)
{
SilcHash hash = hmac->hash;
- silc_hmac_init_internal(hmac, hmac->key, hmac->key_len);
+ silc_hmac_init_internal(hmac, (unsigned char *)key, key_len);
silc_hash_init(hash);
silc_hash_update(hash, hmac->inner_pad, silc_hash_block_len(hash));
}