MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ccp_authenc

Function ccp_authenc

freebsd/crypto/ccp/ccp_hardware.c:1696–1720  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1694}
1695
1696int __must_check
1697ccp_authenc(struct ccp_queue *qp, struct ccp_session *s, struct cryptop *crp)
1698{
1699 struct ccp_completion_ctx ctx;
1700 int error;
1701
1702 ctx.callback_fn = ccp_authenc_done;
1703 ctx.session = s;
1704 ctx.callback_arg = crp;
1705
1706 /* Perform first operation */
1707 if (CRYPTO_OP_IS_ENCRYPT(crp->crp_op))
1708 error = ccp_do_blkcipher(qp, s, crp, NULL);
1709 else
1710 error = ccp_do_hmac(qp, s, crp, NULL);
1711 if (error != 0)
1712 return (error);
1713
1714 /* Perform second operation */
1715 if (CRYPTO_OP_IS_ENCRYPT(crp->crp_op))
1716 error = ccp_do_hmac(qp, s, crp, &ctx);
1717 else
1718 error = ccp_do_blkcipher(qp, s, crp, &ctx);
1719 return (error);
1720}
1721
1722static int __must_check
1723ccp_do_ghash_aad(struct ccp_queue *qp, struct ccp_session *s)

Callers 1

ccp_processFunction · 0.85

Calls 2

ccp_do_blkcipherFunction · 0.85
ccp_do_hmacFunction · 0.85

Tested by

no test coverage detected