X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=create_hmac%2Fcreate_hmac.c;h=e35c782d0e5cc124850c439b6c77368f38709028;hb=c0a0ead97cf5dc85429caae24cc2ffe65fb2805c;hp=e966bcafff843ad17369216981824c1a2b1c0afb;hpb=9ee7cd05c0df937fbc09b48ec7078bcf382aeffc;p=create_hmac.git diff --git a/create_hmac/create_hmac.c b/create_hmac/create_hmac.c index e966bca..e35c782 100644 --- a/create_hmac/create_hmac.c +++ b/create_hmac/create_hmac.c @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010 Florian Forster + * Copyright (c) 2010-2014 Florian Forster * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal @@ -75,10 +75,12 @@ static HCRYPTKEY create_hmac_key_exact (HCRYPTPROV hProv, * The "CRYPT_IPSEC_HMAC_KEY" is required to allow RC2 keys longer than * 16 byte. Again, this is documented on the "CryptImportKey" page as a * side note. */ - status = CryptImportKey (hProv, (BYTE *) data, sizeof (data), - /* public key = */ 0, - /* flags = */ CRYPT_IPSEC_HMAC_KEY, - &ret_key); + status = CryptImportKey (hProv, + /* pbData = */ (void *) data, + /* dwDataLen = */ data_size, + /* hPubKey = */ 0, + /* dwFlags = */ CRYPT_IPSEC_HMAC_KEY, + /* phKey = */ &ret_key); if (!status) { free (data);