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