资源简介
ATSHA204的加密芯片驱动库,可以移植到单片机上。支持IIC总线和单总线

代码片段和文件信息
// ATMEL Microcontroller Software Support - Colorado Springs CO -
// ----------------------------------------------------------------------------
// DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL “AS IS“ AND ANY EXPRESS OR
// IMPLIED WARRANTIES INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
// MERCHANTABILITY FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
// DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT INDIRECT
// INCIDENTAL SPECIAL EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING BUT NOT
// LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE DATA
// OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY WHETHER IN CONTRACT STRICT LIABILITY OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// ----------------------------------------------------------------------------
/** \file
* \brief SHA204 Helper Functions
* \author Tuwuh Sarwoprasojo Atmel Bali Team
* \date November 21 2011
*/
#include // needed for memcpy()
#include
#include “sha204_helper.h“
#include “sha204_lib_return_codes.h“ // declarations of function return codes
#include “sha204_comm_marshaling.h“ // definitions and declarations for the Command module
// Atmel‘s SHA256 implementation
// #include “Sha256_atmel.h“
// Modified free/open-source SHA256 implementation (taken from SA102 library)
#include “sha256.h“
/** \brief This is a wrapper function for SHA256 algorithm.
*
* User can modify this function depending on their SHA256 implementation.
*
* \param [inout] param Structure for input/output parameters. Refer to sha204h_calculate_sha256_in_out.
*/
static void sha204h_calculate_sha256(struct sha204h_calculate_sha256_in_out *param)
{
// This is the “free/open-source“ implementation
sha256(param->message param->length param->digest);
// This is Atmel‘s implementation
// create_sha256(param->length param->message param->digest);
}
/** \brief This function calculates a 32-byte nonce based on 20-byte input value (NumIn) and 32-byte random number (RandOut).
*
* This nonce will match with the nonce generated in the Device by Nonce opcode.
* To use this function Application first executes Nonce command in the Device with a chosen NumIn.
* Nonce opcode Mode parameter must be set to use random nonce (mode 0 or 1).
* The Device generates a nonce stores it in its TempKey and outputs random number RandOut to host.
* This RandOut along with NumIn are passed to nonce calculation function. The function calculates the nonce and returns it.
* This function can also be used to fill in the nonce directly to TempKey (pass-through mode). The flags will automatically set according to the mode us
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2015-01-08 12:40 sha204_helper\
文件 33500 2014-11-27 18:35 sha204_helper\sha204_helper.c
文件 14002 2014-08-29 18:06 sha204_helper\sha204_helper.h
目录 0 2015-01-08 12:40 sha204_helper\sha256\
文件 15848 2010-01-27 17:33 sha204_helper\sha256\sha256.c
文件 2847 2010-01-27 17:33 sha204_helper\sha256\sha256.h
文件 6957 2011-11-18 11:30 sha204_helper\sha256\Sha256_atmel.c
文件 406 2011-11-18 11:32 sha204_helper\sha256\Sha256_atmel.h
目录 0 2015-05-25 15:24 sha204_library\
目录 0 2015-01-08 12:40 sha204_library\arch\
目录 0 2015-01-08 12:40 sha204_library\arch\samd21\
目录 0 2015-01-08 12:40 sha204_library\arch\samd21\i2c\
文件 8799 2014-12-01 11:11 sha204_library\arch\samd21\i2c\i2c_phys.c
文件 4610 2015-01-23 14:17 sha204_library\arch\samd21\i2c\i2c_phys.h
目录 0 2015-01-08 12:40 sha204_library\arch\samd21\timer\
文件 3973 2015-05-25 14:46 sha204_library\arch\samd21\timer\sha204_timer_utilities.c
文件 2148 2014-12-01 10:45 sha204_library\arch\samd21\timer\sha204_timer_utilities.h
文件 105857 2015-05-25 15:24 sha204_library\Doxyfile
文件 11631 2014-12-01 13:22 sha204_library\sha204_comm.c
文件 4202 2015-01-23 14:16 sha204_library\sha204_comm.h
文件 10526 2015-05-25 15:56 sha204_library\sha204_comm_marshaling.c
文件 26824 2015-05-25 15:17 sha204_library\sha204_comm_marshaling.h
文件 6998 2014-11-28 17:27 sha204_library\sha204_config.h
文件 10066 2014-12-01 11:07 sha204_library\sha204_i2c.c
文件 3945 2014-01-16 10:11 sha204_library\sha204_lib_return_codes.h
文件 4268 2014-12-01 11:03 sha204_library\sha204_physical.h
- 上一篇:控制柜电路图
- 下一篇:高校管理信息系统 数据库设计
相关资源
- 希尔密码加密、解密和破密
- PNG加密解密工具73383
- m1卡 ic卡可选择扇区初始化加密软件
- Zprotect专业版(无限制) 一机一码E
- 加密软件漏洞评测系统 V8.9
- C 大整数RSA加密
- [免费]安全加密软件U盘加密,文件加
- 加密cad图形的lisp文件
- 透明加密源码及说明
- Openssl给文件传输加密
- 3des加解密_C 实现
- ESAM相关文章集合
- RSA AES DES ECC加密算法源码
- 密码学课程设计:DES加密解密算法的
- C 标准文档(已加密)
- 破解QQ空间相册加密查看
- 威盾PHP加密专家——php代码加密软件
- 管家婆加密狗工具dogtools
- 提供几个加密算法的源码
- 非常好用的硬盘加密软件-个人密盘
- 基于89C51计算机锁定加密键盘设计
- U盘防拷贝系统破小孩
- 易语言叮小当动态加密算法源码
- 易语言文本加密成数字源码
- 易语言RC4加密解密源码
- 易语言字节集加密解密对比源码
- 易语言椭圆曲线算法加密文件源码
- 易语言文件分段加密类源码
- 易语言文本加密源码
- 易语言文本加密解密源码
评论
共有 条评论