+ memcpy(macctx->key, key, keylen);
+ /* Pad with zeroes at the end if required */
+ if (keylen < BLAKE2_KEYBYTES)
+ memset(macctx->key + keylen, 0, BLAKE2_KEYBYTES - keylen);
+ BLAKE2_PARAM_SET_KEY_LENGTH(&macctx->params, (uint8_t)keylen);
+ return 1;
+}
+
+static int blake2_mac_init(void *vmacctx, const unsigned char *key,
+ size_t keylen, const OSSL_PARAM params[])
+{
+ struct blake2_mac_data_st *macctx = vmacctx;