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

📄 sha_if.c

📁 SecuDe是一个由安全应用程序接口组成,对验证机制、证件处理、PEM、X.400报文处理和密钥管理提供支持。SecuDe提供DES、 RSA杂凑函数、密钥生成以及数字签名的生成和核实等多种密码机制。
💻 C
字号:
/******************************************************************** * Copyright (C) 1991, GMD. All rights reserved.                    * *                                                                  * *                                                                  * *                         NOTICE                                   * *                                                                  * *    Acquisition, use, and distribution of this module             * *    and related materials are subject to restrictions             * *    mentioned in each volume of the documentation.                * *                                                                  * ********************************************************************//* *  SHS interface module between sec_hash, sec_sign, sec_verify and  *  the C version by Peter Gutmann, HPACK Conspiracy Secret Laboratory *   * *  WS 8.9.92 * *  Last change: 8.9.92 * *  Imports: * *  shsInit(shsInfo) *  shsUpdate(shsInfo, inBuf, inLen) *  shsFinal(shsInfo) * * *  sha_hash(in_octets, hash_result, more) * */#include "sha.h"#include <secure.h>RC sha_hash(in_octets, hash_result, more)OctetString *in_octets, *hash_result;More more;{        static char first = TRUE;        static SHS_INFO shsInfo;        if(first) {                shsInit(&shsInfo);                first = FALSE;        }        shsUpdate(&shsInfo, (BYTE *) in_octets->octets, in_octets->noctets);        if(more == END) {                first = TRUE;                shsFinal(&shsInfo);                /* memory of hash_result->octets provided by calling program */                bcopy(&shsInfo.digest[0], (BYTE *) hash_result->octets, SHS_DIGESTSIZE);                hash_result->noctets = SHS_DIGESTSIZE;        }        return(0);}

⌨️ 快捷键说明

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