/**\r
- * Copyright (c) 2010 Florian Forster\r
+ * Copyright (c) 2010-2014 Florian Forster\r
*\r
* Permission is hereby granted, free of charge, to any person obtaining a copy\r
* of this software and associated documentation files (the "Software"), to deal\r
* The "CRYPT_IPSEC_HMAC_KEY" is required to allow RC2 keys longer than\r
* 16 byte. Again, this is documented on the "CryptImportKey" page as a\r
* side note. */\r
- status = CryptImportKey (hProv, (BYTE *) data, sizeof (data),\r
- /* public key = */ 0,\r
- /* flags = */ CRYPT_IPSEC_HMAC_KEY,\r
- &ret_key);\r
+ status = CryptImportKey (hProv,\r
+ /* pbData = */ (void *) data,\r
+ /* dwDataLen = */ data_size,\r
+ /* hPubKey = */ 0,\r
+ /* dwFlags = */ CRYPT_IPSEC_HMAC_KEY,\r
+ /* phKey = */ &ret_key);\r
if (!status)\r
{\r
free (data);\r