Home | History | Annotate | Download | only in crypto

Lines Matching refs:akey

247 	struct aes_context *akey;
265 akey = os_zalloc(sizeof(*akey));
266 if (akey == NULL)
269 if (!CryptAcquireContext(&akey->prov, NULL,
274 os_free(akey);
278 if (!CryptImportKey(akey->prov, (BYTE *) &key_blob, sizeof(key_blob),
279 0, 0, &akey->ckey)) {
282 CryptReleaseContext(akey->prov, 0);
283 os_free(akey);
287 if (!CryptSetKeyParam(akey->ckey, KP_MODE, (BYTE *) &mode, 0)) {
290 CryptDestroyKey(akey->ckey);
291 CryptReleaseContext(akey->prov, 0);
292 os_free(akey);
296 return akey;
302 struct aes_context *akey = ctx;
307 if (!CryptEncrypt(akey->ckey, 0, FALSE, 0, crypt, &dlen, 16)) {
317 struct aes_context *akey = ctx;
318 if (akey) {
319 CryptDestroyKey(akey->ckey);
320 CryptReleaseContext(akey->prov, 0);
321 os_free(akey);
334 struct aes_context *akey = ctx;
340 if (!CryptDecrypt(akey->ckey, 0, FALSE, 0, plain, &dlen)) {