Lines Matching defs:cipher
179 struct crypto_cipher *cipher;
194 cipher = crypto_cipher_init(encr_alg, iv, key, key_len);
195 if (cipher == NULL) {
196 wpa_printf(MSG_INFO, "IKEV2: Failed to initialize cipher");
200 if (crypto_cipher_encrypt(cipher, plain, crypt, len) < 0) {
202 crypto_cipher_deinit(cipher);
205 crypto_cipher_deinit(cipher);
214 struct crypto_cipher *cipher;
229 cipher = crypto_cipher_init(encr_alg, iv, key, key_len);
230 if (cipher == NULL) {
231 wpa_printf(MSG_INFO, "IKEV2: Failed to initialize cipher");
235 if (crypto_cipher_decrypt(cipher, crypt, plain, len) < 0) {
237 crypto_cipher_deinit(cipher);
240 crypto_cipher_deinit(cipher);