]> git.saurik.com Git - apple/xnu.git/blob - osfmk/corecrypto/cchmac/src/cchmac.c
xnu-3247.1.106.tar.gz
[apple/xnu.git] / osfmk / corecrypto / cchmac / src / cchmac.c
1 /*
2 * cchmac.c
3 * corecrypto
4 *
5 * Created on 12/07/2010
6 *
7 * Copyright (c) 2010,2011,2012,2015 Apple Inc. All rights reserved.
8 *
9 */
10
11 #include <corecrypto/cchmac.h>
12
13 void cchmac(const struct ccdigest_info *di,
14 unsigned long key_len, const void *key,
15 unsigned long data_len, const void *data, unsigned char *mac) {
16 cchmac_di_decl(di, hc);
17 cchmac_init(di, hc, key_len, key);
18 cchmac_update(di, hc, data_len, data);
19 cchmac_final(di, hc, mac);
20 cchmac_di_clear(di, hc);
21 }