-
-/* =============================================================================
-
- Legacy - Please migrate to new functions above
-
- ==============================================================================*/
-
-/*
- Guidelines for switching to new CMAC functions
-
- Legacy New functions
- cccmac_init -> cccmac_init w/ key kength in bytes
- cccmac_block_update -> cccmac_update w/ size in bytes instead of blocks
- cccmac_final -> cccmac_final_generate or cccmac_final_verify
- depending the use case preceeded
- by cccmac_update if any leftover bytes.
- cccmac -> cccmac_one_shot_generate or cccmac_one_shot_verify
- depending the use case
-
- */
-
-/*!
- @function cccmac_block_update
- @abstract Process data
- */
-
-CC_INLINE void cccmac_block_update(CC_UNUSED const struct ccmode_cbc *cbc, cccmac_ctx_t ctx,
- size_t nblocks, const void *data)
-__attribute__((deprecated("see guidelines in corecrypto/cccmac.h for migration", "cccmac_update")));
-
-CC_INLINE void cccmac_block_update(CC_UNUSED const struct ccmode_cbc *cbc, cccmac_ctx_t ctx,
- size_t nblocks, const void *data) {
- cccmac_update(ctx,(nblocks)*CMAC_BLOCKSIZE,data);
-}
-
-/*!
- @function cccmac_final
- @abstract Finalize CMAC generation
- */
-CC_INLINE void cccmac_final(CC_UNUSED const struct ccmode_cbc *cbc, cccmac_ctx_t ctx,
- size_t nbytes, const void *in, void *out)
-__attribute__((deprecated("see guidelines in corecrypto/cccmac.h for migration", "cccmac_final_generate or cccmac_final_verify")));
-
-CC_INLINE void cccmac_final(CC_UNUSED const struct ccmode_cbc *cbc, cccmac_ctx_t ctx,
- size_t nbytes, const void *in, void *out) {
- cccmac_update(ctx, nbytes, in);
- cccmac_final_generate(ctx,CMAC_BLOCKSIZE,out);
-}
-
-/*!
- @function cccmac
- @abstract One shot CMAC generation with 128bit key
- */
-CC_INLINE void cccmac(const struct ccmode_cbc *cbc,
- const void *key,
- size_t data_len, const void *data, void *mac)
-__attribute__((deprecated("see guidelines in corecrypto/cccmac.h for migration", "cccmac_one_shot_generate or cccmac_one_shot_verify")));
-
-CC_INLINE void cccmac(const struct ccmode_cbc *cbc,
- const void *key,
- size_t data_len, const void *data, void *mac) {
- cccmac_one_shot_generate(cbc,16,key,data_len,data,16,mac);
-}
-
-
-