changed low freq. clock source to IRC
Dependents: BLE_ANCS_SDAPI_IRC
Fork of nRF51822 by
nrf_ecb.h
00001 /* Copyright (c) 2012 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 * WARRANTY of ANY KIND is provided. This heading must NOT be removed from 00009 * the file. 00010 * 00011 * $LastChangedRevision: 13999 $ 00012 */ 00013 00014 /** 00015 * @file 00016 * @brief ECB driver API. 00017 */ 00018 00019 #ifndef NRF_ECB_H__ 00020 #define NRF_ECB_H__ 00021 00022 /** 00023 * @defgroup nrf_ecb AES ECB encryption 00024 * @{ 00025 * @ingroup nrf_drivers 00026 * @brief Driver for the nRF51 AES Electronic Code Book (ECB) peripheral. 00027 * 00028 * In order to encrypt and decrypt data the peripheral must be powered on 00029 * using nrf_ecb_init() and then the key set using nrf_ecb_set_key. 00030 */ 00031 00032 #include <stdint.h> 00033 #include "nordic_global.h" 00034 00035 /** 00036 * Initialize and power on the ECB peripheral. 00037 * 00038 * Allocates memory for the ECBDATAPTR. 00039 * @retval true Initialization was successful. 00040 * @retval false Powering up failed. 00041 */ 00042 bool nrf_ecb_init(void); 00043 00044 /** 00045 * Encrypt/decrypt 16-byte data using current key. 00046 * 00047 * The function avoids unnecessary copying of data if the point to the 00048 * correct locations in the ECB data structure. 00049 * 00050 * @param dst Result of encryption/decryption. 16 bytes will be written. 00051 * @param src Source with 16-byte data to be encrypted/decrypted. 00052 * 00053 * @retval true If the encryption operation completed. 00054 * @retval false If the encryption operation did not complete. 00055 */ 00056 bool nrf_ecb_crypt(uint8_t * dst, const uint8_t * src); 00057 00058 /** 00059 * Set the key to be used for encryption/decryption. 00060 * 00061 * @param key Pointer to key. 16 bytes will be read. 00062 */ 00063 void nrf_ecb_set_key(const uint8_t * key); 00064 00065 #endif // NRF_ECB_H__ 00066 00067 /** @} */
Generated on Tue Jul 12 2022 16:36:22 by 1.7.2