Home | History | Annotate | Download | only in crypto

Lines Matching refs:akey

238 	struct aes_context *akey;
256 akey = os_zalloc(sizeof(*akey));
257 if (akey == NULL)
260 if (!CryptAcquireContext(&akey->prov, NULL,
265 os_free(akey);
269 if (!CryptImportKey(akey->prov, (BYTE *) &key_blob, sizeof(key_blob),
270 0, 0, &akey->ckey)) {
273 CryptReleaseContext(akey->prov, 0);
274 os_free(akey);
278 if (!CryptSetKeyParam(akey->ckey, KP_MODE, (BYTE *) &mode, 0)) {
281 CryptDestroyKey(akey->ckey);
282 CryptReleaseContext(akey->prov, 0);
283 os_free(akey);
287 return akey;
293 struct aes_context *akey = ctx;
298 if (!CryptEncrypt(akey->ckey, 0, FALSE, 0, crypt, &dlen, 16)) {
308 struct aes_context *akey = ctx;
309 if (akey) {
310 CryptDestroyKey(akey->ckey);
311 CryptReleaseContext(akey->prov, 0);
312 os_free(akey);
325 struct aes_context *akey = ctx;
331 if (!CryptDecrypt(akey->ckey, 0, FALSE, 0, plain, &dlen)) {