00001 /* Copyright (c) 2009 Nordic Semiconductor. All Rights Reserved. 00002 * 00003 * The information contained herein is confidential property of Nordic 00004 * Semiconductor ASA.Terms and conditions of usage are described in detail 00005 * in NORDIC SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. 00006 * 00007 * Licensees are granted free, non-transferable use of the information. NO 00008 * WARRENTY of ANY KIND is provided. This heading must NOT be removed from 00009 * the file. 00010 * 00011 * $LastChangedRevision: 133 $ 00012 */ 00013 00018 //lint -e714 00019 00020 #include "hal_rng.h" 00021 00022 void lib_crypt_generate_ls5b(uint8_t * dest_buf) 00023 { 00024 uint8_t i; 00025 hal_rng_power_up(true); 00026 00027 for(i=0;i<5;i++) 00028 { 00029 while(!hal_rng_data_ready()) 00030 {} 00031 dest_buf[i] = hal_rng_read(); 00032 } 00033 00034 hal_rng_power_up(false); 00035 } 00036