1.怎么用哈希算法查看word文档
Hash,一般翻译做“散列”,也有直接音译为"哈希"的,就是把任意长度的输入(又叫做预映射, pre-image),通过散列算法,变换成固定长度的输出,该输出就是散列值。
这种转换是一种压缩映射,也就是,散列值的空间通常远小于输入的空间,不同的输入可能会散列成相同的输出,而不可能从散列值来唯一的确定输入值。 密码学上的 Hash 又被称为"消息摘要(message digest)。
MD5 和 SHA1 可以说是目前应用最广泛的Hash算法,而它们都是以 MD4 为基础设计的。参考相应RFC文档可以得到MD4(RFC 1320)、MD5(RFC 1321)算法的详细描述和算法的C源代码。
下面是SHA1算法的实现:/* * sha1.h * * Copyright (C) 1998, 2009 * Paul E. Jones * All Rights Reserved * ***************************************************************************** * $Id: sha1.h 12 2009-06-22 19:34:25Z paulej $ ***************************************************************************** * * Description: * This class implements the Secure Hashing Standard as defined * in FIPS PUB 180-1 published April 17, 1995. * * Many of the variable names in the SHA1Context, especially the * single character names, were used because those were the names * used in the publication. * * Please read the file sha1.c for more information. * */#ifndef _SHA1_H_#define _SHA1_H_/* * This structure will hold context information for the hashing * operation */typedef struct SHA1Context{ unsigned Message_Digest[5]; /* Message Digest (output) */ unsigned Length_Low; /* Message length in bits */ unsigned Length_High; /* Message length in bits */ unsigned char Message_Block[64]; /* 512-bit message blocks */ int Message_Block_Index; /* Index into message block array */ int Computed; /* Is the digest computed? */ int Corrupted; /* Is the message digest corruped? */} SHA1Context;/* * Function Prototypes */void SHA1Reset(SHA1Context *);int SHA1Result(SHA1Context *);void SHA1Input( SHA1Context *, const unsigned char *, unsigned);#endif/* * sha1.c * * Copyright (C) 1998, 2009 * Paul E. Jones * All Rights Reserved * ***************************************************************************** * $Id: sha1.c 12 2009-06-22 19:34:25Z paulej $ ***************************************************************************** * * Description: * This file implements the Secure Hashing Standard as defined * in FIPS PUB 180-1 published April 17, 1995. * * The Secure Hashing Standard, which uses the Secure Hashing * Algorithm (SHA), produces a 160-bit message digest for a * given data stream. In theory, it is highly improbable that * two messages will produce the same message digest. Therefore, * this algorithm can serve as a means of providing a "fingerprint" * for a message. * * Portability Issues: * SHA-1 is defined in terms of 32-bit "words". This code was * written with the expectation that the processor has at least * a 32-bit machine word size. If the machine word size is larger, * the code should still function properly. One caveat to that * is that the input functions taking characters and character * arrays assume that only 8 bits of information are stored in each * character. * * Caveats: * SHA-1 is designed to work with messages less than 2^64 bits * long. Although SHA-1 allows a message digest to be generated for * messages of any number of bits less than 2^64, this * implementation only works with messages with a length that is a * multiple of the size of an 8-bit character. * */#include "sha1.h"/* * Define the circular shift macro */#define SHA1CircularShift(bits,word) \ ((((word) > (32-(bits))))/* Function prototypes */void SHA1ProcessMessageBlock(SHA1Context *);void SHA1PadMessage(SHA1Context *);/* * SHA1Reset * * Description: * This function will initialize the SHA1Context in preparation * for computing a new message digest. *。
2.word计算器怎么计算
步骤:
1、打开Word后,点击开始标签,在弹出菜单中选择“ 选项” 菜单项。
2、在打开的Word选项窗口中,点击左侧的“ 自定义功能区 ”侧边栏。
3、这时在右侧的“ 从下列位置选择命令 ”下拉菜单中选择“ 不在功能区的命令 ”菜单项。
4、在右侧窗口的下方点击“ 新建选项卡” 按钮。
5、在新建选项卡上点击右键,在弹出菜单中选择“ 重命名 ”菜单项。
6、在弹出窗口中给新建选项卡重命名,例如:计算器。
7、在左侧找到“ 计算 ”菜单项,然后点击“ 添加 ”按钮,把其添加到刚刚建立的“ 计算器” 选项卡下。
8、以后再在Word中输入需要计算的等式时,选中刚刚输入的等式,然后点击“ 计算器 ”标签,点击工具栏上的“ 工具计算 ”按钮,这时结果会保存到剪贴板上,我们直接粘贴到结果的位置 就可以了
3.word文档加密算法
给Word文档加密主要有以下几个方法:
文件加密文件菜单设置:1、打开需要加密的Word文档。2、选“文件”的“另存为”,出现“另存为”对话框,在“工具”中选“常规选项”,出现“保存”选项卡。3、分别在“打开权限密码”和“修改权限密码”中输入密码(这两种密码可以相同也可以不同)。4、再次确认“打开权限密码”和“修改权限密码”。按“确定”退出“保存”选项卡。5、文件存盘。
工具菜单设置:1、打开需要加密的Word文档。2、选“工具”菜单的“选项”命令,出现“选项对话框”。3、在“选项”对话框中选“保存”选项卡。4、分别在“打开权限密码”和“修改权限密码”中输入密码,点“确定”退出。5、将文件保存。
转载请注明出处51数据库 » 引力搜索算法word
我-停止了心跳