Roy Want / Mbed OS beaconCompileReadyFork
Committer:
roywant
Date:
Mon Sep 19 00:59:11 2016 +0000
Revision:
0:ed0152b5c495
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
roywant 0:ed0152b5c495 1 /* mbed Microcontroller Library
roywant 0:ed0152b5c495 2 * Copyright (c) 2006-2015 ARM Limited
roywant 0:ed0152b5c495 3 *
roywant 0:ed0152b5c495 4 * Licensed under the Apache License, Version 2.0 (the "License");
roywant 0:ed0152b5c495 5 * you may not use this file except in compliance with the License.
roywant 0:ed0152b5c495 6 * You may obtain a copy of the License at
roywant 0:ed0152b5c495 7 *
roywant 0:ed0152b5c495 8 * http://www.apache.org/licenses/LICENSE-2.0
roywant 0:ed0152b5c495 9 *
roywant 0:ed0152b5c495 10 * Unless required by applicable law or agreed to in writing, software
roywant 0:ed0152b5c495 11 * distributed under the License is distributed on an "AS IS" BASIS,
roywant 0:ed0152b5c495 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
roywant 0:ed0152b5c495 13 * See the License for the specific language governing permissions and
roywant 0:ed0152b5c495 14 * limitations under the License.
roywant 0:ed0152b5c495 15 */
roywant 0:ed0152b5c495 16 #include "EntropySource.h"
roywant 0:ed0152b5c495 17
roywant 0:ed0152b5c495 18 #if !defined(TARGET_NRF51822) && !defined(TARGET_MCU_NRF52832) /* Persistent storage supported on nrf51 platforms */
roywant 0:ed0152b5c495 19 /**
roywant 0:ed0152b5c495 20 * When not using an nRF51-based target then entropy source is currently unimplemented.
roywant 0:ed0152b5c495 21 */
roywant 0:ed0152b5c495 22 #error "INSECURE CONFIGURATION - YOU MUST IMPLEMENT AN ENTROPY SOURCE"
roywant 0:ed0152b5c495 23
roywant 0:ed0152b5c495 24 int eddystoneRegisterEntropySource( mbedtls_entropy_context* ctx) {
roywant 0:ed0152b5c495 25 return 1;
roywant 0:ed0152b5c495 26 }
roywant 0:ed0152b5c495 27
roywant 0:ed0152b5c495 28 int eddystoneEntropyPoll( void *data,
roywant 0:ed0152b5c495 29 unsigned char *output, size_t len, size_t *olen )
roywant 0:ed0152b5c495 30 {
roywant 0:ed0152b5c495 31 return( 1 );
roywant 0:ed0152b5c495 32 }
roywant 0:ed0152b5c495 33 #endif /* #ifdef TARGET_NRF51822 */