mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
crypto: extend mode as a parameter in qcrypto_cipher_supports()
It can't guarantee all cipher modes are supported if one cipher algorithm is supported by a backend. Let's extend qcrypto_cipher_supports() to take both the algorithm and mode as parameters. Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
e8ddc2eae5
commit
f844836ddc
8 changed files with 47 additions and 9 deletions
|
@ -85,13 +85,15 @@ struct QCryptoCipher {
|
|||
/**
|
||||
* qcrypto_cipher_supports:
|
||||
* @alg: the cipher algorithm
|
||||
* @mode: the cipher mode
|
||||
*
|
||||
* Determine if @alg cipher algorithm is supported by the
|
||||
* Determine if @alg cipher algorithm in @mode is supported by the
|
||||
* current configured build
|
||||
*
|
||||
* Returns: true if the algorithm is supported, false otherwise
|
||||
*/
|
||||
bool qcrypto_cipher_supports(QCryptoCipherAlgorithm alg);
|
||||
bool qcrypto_cipher_supports(QCryptoCipherAlgorithm alg,
|
||||
QCryptoCipherMode mode);
|
||||
|
||||
/**
|
||||
* qcrypto_cipher_get_block_len:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue