]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/corecrypto/cc/src/cc_clear.c
79f9d971f74237a54ee03ffac66207164de0fc3a
5 * Created on 05/21/2014
7 * Copyright (c) 2014,2015 Apple Inc. All rights reserved.
11 #include <corecrypto/cc.h>
13 void cc_clear(size_t len
, void *dst
)
15 #if ( CC_HAS_MEMSET_S == 1 ) && (defined( __STDC_WANT_LIB_EXT1__ ) && ( __STDC_WANT_LIB_EXT1__ == 1 ) )
16 memset_s(dst
,len
,0,len
);
18 volatile size_t ctr
=0;
19 volatile uint8_t *data
=dst
;
22 (void)data
[ctr
]; // Touch the buffer so that the compiler does not
23 // Optimize out the zeroing