]> git.saurik.com Git - apple/xnu.git/blob - osfmk/corecrypto/ccdigest/src/ccdigest_init.c
b9b3b8852a764588e431bcd9a246b7132b2d4ed5
[apple/xnu.git] / osfmk / corecrypto / ccdigest / src / ccdigest_init.c
1 /*
2 * ccdigest_init.c
3 * corecrypto
4 *
5 * Created by Michael Brouwer on 11/30/10.
6 * Copyright 2010,2011 Apple Inc. All rights reserved.
7 *
8 */
9
10 #include <corecrypto/ccdigest.h>
11 #include <corecrypto/ccn.h>
12
13 void ccdigest_init(const struct ccdigest_info *di, ccdigest_ctx_t ctx) {
14 ccdigest_copy_state(di, ccdigest_state_ccn(di, ctx), di->initial_state);
15 ccdigest_nbits(di, ctx) = 0;
16 ccdigest_num(di, ctx) = 0;
17 }