⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tini400_crypt.h

📁 TINI的pop3的c代码
💻 H
字号:
/*---------------------------------------------------------------------------
 *  Copyright (C) 2003 Dallas Semiconductor Corporation, All Rights Reserved.
 * 
 *  Permission is hereby granted, free of charge, to any person obtaining a
 *  copy of this software and associated documentation files (the "Software"),
 *  to deal in the Software without restriction, including without limitation
 *  the rights to use, copy, modify, merge, publish, distribute, sublicense,
 *  and/or sell copies of the Software, and to permit persons to whom the
 *  Software is furnished to do so, subject to the following conditions:
 * 
 *  The above copyright notice and this permission notice shall be included
 *  in all copies or substantial portions of the Software.
 * 
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 *  OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 *  MERCHANTABILITY,  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 *  IN NO EVENT SHALL DALLAS SEMICONDUCTOR BE LIABLE FOR ANY CLAIM, DAMAGES
 *  OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
 *  ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 *  OTHER DEALINGS IN THE SOFTWARE.
 * 
 *  Except as contained in this notice, the name of Dallas Semiconductor
 *  shall not be used except as stated in the Dallas Semiconductor
 *  Branding Policy.
 * ---------------------------------------------------------------------------
 *
 * This file contains function definitions for the SHA-1 and MD4 hash algorithms
 * for the Dallas Semiconductor DS80C400 processor.  This file is intended for
 * use with the Keil MicroVision (uVision) C compiler.
 *
 * ---------------------------------------------------------------------------
 */
#ifndef __tini400_crypt_
#define __tini400_crypt_

/** \file tini400_crypt.h
 *  \brief SHA-1 and MD4 functions for the DS80C400
 *
 *  This library contains functions that compute the SHA-1 hash and MD4 hash of
 *  a byte array.
 *  
 *  For detailed information on the DS80C400 please see the
 *  <a href="http://pdfserv.maxim-ic.com/arpdf/Design/DS80C400UG.pdf">
 *  High-Speed Microcontroller User's Guide: DS80C400 Supplement</a>.
 *
 *  \warning  The functions in this library are <b>NOT</b> multi-process 
 *            safe--that is, if you call the same method from two different 
 *            processes at the same time, the parameters to the function 
 *            may be destroyed, yielding unpredictable results.  Consult
 *            each individual funtion's documentation for details on which
 *            functions are multi-process safe.
 */

/** Version number associated with this header file.  Should be the same as
 * the version number returned by the <i>#crypt_version</i> function.
 * \sa crypt_version */
#define TINI400_CRYPT_VERSION         3

/**
 * \brief        Returns the version number of this CRYPT library.
 *
 * \return       Version number of this CRYPT library.
 */
//---------------------------------------------------------------------------
unsigned int crypt_version(void);

/**
 * \brief        Computes a SHA-1 hash on the given message.
 *
 * See FIPS 180-1 for more information on SHA-1.
 *
 * \param inLength length of the message to hash
 * \param inBuff the message to hash
 * \param outBuff holds the hash value on return (20 bytes minimum)
 */
//---------------------------------------------------------------------------
void crypt_sha1(short inLength, void *inBuff, void *outBuff);

/**
 * \brief        Computes a MD4 hash on the given message.
 *
 * See rfc1320 for more information.
 *
 * \param out holds the hash value on return (16 bytes)
 * \param in  the message to hash
 * \param n   length of the message to hash
 */
//---------------------------------------------------------------------------
void crypt_md4(unsigned char *out, unsigned char *in, int n);

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -