| 1 | /* |
| 2 | * SPDX-License-Identifier: GPL-2.0-or-later |
| 3 | * |
| 4 | * QEMU Crypto cipher impl stub |
| 5 | * |
| 6 | * Copyright (c) 2025 Red Hat, Inc. |
| 7 | * |
| 8 | */ |
| 9 | |
| 10 | bool qcrypto_cipher_supports(QCryptoCipherAlgo alg, |
| 11 | QCryptoCipherMode mode) |
| 12 | { |
| 13 | return false; |
| 14 | } |
| 15 | |
| 16 | static QCryptoCipher *qcrypto_cipher_ctx_new(QCryptoCipherAlgo alg, |
| 17 | QCryptoCipherMode mode, |
| 18 | const uint8_t *key, |
| 19 | size_t nkey, |
| 20 | Error **errp) |
| 21 | { |
| 22 | if (!qcrypto_cipher_validate_key_length(alg, mode, nkey, errp)) { |
| 23 | return NULL; |
| 24 | } |
| 25 | |
| 26 | error_setg(errp, |
| 27 | "Unsupported cipher algorithm %s, no crypto library enabled in build", |
| 28 | QCryptoCipherAlgo_str(alg)); |
| 29 | return NULL; |
| 30 | } |