Lines Matching refs:cipher
253 QCryptoCipher *cipher) in qcrypto_block_push_cipher() argument
264 block->free_ciphers[block->n_free_ciphers] = cipher; in qcrypto_block_push_cipher()
275 QCryptoCipher *cipher; in qcrypto_block_init_cipher() local
290 cipher = qcrypto_block_pop_cipher(block, errp); in qcrypto_block_init_cipher()
291 if (!cipher) { in qcrypto_block_init_cipher()
297 qcrypto_block_push_cipher(block, cipher); in qcrypto_block_init_cipher()
368 typedef int (*QCryptoCipherEncDecFunc)(QCryptoCipher *cipher,
374 static int do_qcrypto_block_cipher_encdec(QCryptoCipher *cipher, in do_qcrypto_block_cipher_encdec() argument
407 if (qcrypto_cipher_setiv(cipher, in do_qcrypto_block_cipher_encdec()
415 if (func(cipher, buf, buf, nbytes, errp) < 0) { in do_qcrypto_block_cipher_encdec()
428 int qcrypto_block_cipher_decrypt_helper(QCryptoCipher *cipher, in qcrypto_block_cipher_decrypt_helper() argument
437 return do_qcrypto_block_cipher_encdec(cipher, niv, ivgen, NULL, sectorsize, in qcrypto_block_cipher_decrypt_helper()
443 int qcrypto_block_cipher_encrypt_helper(QCryptoCipher *cipher, in qcrypto_block_cipher_encrypt_helper() argument
452 return do_qcrypto_block_cipher_encdec(cipher, niv, ivgen, NULL, sectorsize, in qcrypto_block_cipher_encrypt_helper()
465 QCryptoCipher *cipher = qcrypto_block_pop_cipher(block, errp); in qcrypto_block_decrypt_helper() local
466 if (!cipher) { in qcrypto_block_decrypt_helper()
470 ret = do_qcrypto_block_cipher_encdec(cipher, block->niv, block->ivgen, in qcrypto_block_decrypt_helper()
474 qcrypto_block_push_cipher(block, cipher); in qcrypto_block_decrypt_helper()
487 QCryptoCipher *cipher = qcrypto_block_pop_cipher(block, errp); in qcrypto_block_encrypt_helper() local
488 if (!cipher) { in qcrypto_block_encrypt_helper()
492 ret = do_qcrypto_block_cipher_encdec(cipher, block->niv, block->ivgen, in qcrypto_block_encrypt_helper()
496 qcrypto_block_push_cipher(block, cipher); in qcrypto_block_encrypt_helper()