|
@@ -65,7 +65,7 @@ qcrypto_afalg_cipher_ctx_new(QCryptoCipherAlgo alg,
|
|
|
const uint8_t *key,
|
|
|
size_t nkey, Error **errp)
|
|
|
{
|
|
|
- QCryptoAFAlg *afalg;
|
|
|
+ QCryptoAFAlgo *afalg;
|
|
|
size_t expect_niv;
|
|
|
char *name;
|
|
|
|
|
@@ -119,7 +119,7 @@ qcrypto_afalg_cipher_setiv(QCryptoCipher *cipher,
|
|
|
const uint8_t *iv,
|
|
|
size_t niv, Error **errp)
|
|
|
{
|
|
|
- QCryptoAFAlg *afalg = container_of(cipher, QCryptoAFAlg, base);
|
|
|
+ QCryptoAFAlgo *afalg = container_of(cipher, QCryptoAFAlgo, base);
|
|
|
struct af_alg_iv *alg_iv;
|
|
|
size_t expect_niv;
|
|
|
|
|
@@ -143,7 +143,7 @@ qcrypto_afalg_cipher_setiv(QCryptoCipher *cipher,
|
|
|
}
|
|
|
|
|
|
static int
|
|
|
-qcrypto_afalg_cipher_op(QCryptoAFAlg *afalg,
|
|
|
+qcrypto_afalg_cipher_op(QCryptoAFAlgo *afalg,
|
|
|
const void *in, void *out,
|
|
|
size_t len, bool do_encrypt,
|
|
|
Error **errp)
|
|
@@ -202,7 +202,7 @@ qcrypto_afalg_cipher_encrypt(QCryptoCipher *cipher,
|
|
|
const void *in, void *out,
|
|
|
size_t len, Error **errp)
|
|
|
{
|
|
|
- QCryptoAFAlg *afalg = container_of(cipher, QCryptoAFAlg, base);
|
|
|
+ QCryptoAFAlgo *afalg = container_of(cipher, QCryptoAFAlgo, base);
|
|
|
|
|
|
return qcrypto_afalg_cipher_op(afalg, in, out, len, true, errp);
|
|
|
}
|
|
@@ -212,14 +212,14 @@ qcrypto_afalg_cipher_decrypt(QCryptoCipher *cipher,
|
|
|
const void *in, void *out,
|
|
|
size_t len, Error **errp)
|
|
|
{
|
|
|
- QCryptoAFAlg *afalg = container_of(cipher, QCryptoAFAlg, base);
|
|
|
+ QCryptoAFAlgo *afalg = container_of(cipher, QCryptoAFAlgo, base);
|
|
|
|
|
|
return qcrypto_afalg_cipher_op(afalg, in, out, len, false, errp);
|
|
|
}
|
|
|
|
|
|
static void qcrypto_afalg_comm_ctx_free(QCryptoCipher *cipher)
|
|
|
{
|
|
|
- QCryptoAFAlg *afalg = container_of(cipher, QCryptoAFAlg, base);
|
|
|
+ QCryptoAFAlgo *afalg = container_of(cipher, QCryptoAFAlgo, base);
|
|
|
|
|
|
qcrypto_afalg_comm_free(afalg);
|
|
|
}
|