Sarah Marsh / Mbed OS EddystoneBeacon
Committer:
sarahmarshy
Date:
Tue Nov 29 06:29:10 2016 +0000
Revision:
0:1c7da5f83647
Initial commit

Who changed what in which revision?

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