digt.h
来自「伯克利做的SFTP安全文件传输协议」· C头文件 代码 · 共 46 行
H
46 行
// digt.h// module for computing the DIGT value// copyright SafeTP Development Group, Inc., 2000 Terms of use are as specified in license.txt#ifndef __DIGT_H#define __DIGT_H#include "typ.h" // byte, bool#include "datablok.h" // DataBlockclass SHA; // sha.hclass Request; // request.hclass Reply; // reply.hclass DigestComputer { SHA *sha; // SHA computation object DataBlock computedDigt; // digest if already computed bool alreadyComputed; // true if 'computedDigt' is correctpublic: // data static bool echoDigestInput; // when true, we print everything folded into the computation // default: falsepublic: // funcs DigestComputer(); ~DigestComputer(); // fold a request or reply into the calculation // (illegal once the digest has been retrieved) void add(Request const &request); void add(Reply const &reply); // useful if the request or reply is just in a buffer (particularly // since Reply does *not* preserve the precise contents of // what is sent over the wire) void add(byte const *buffer, int length); // retrieve the digest (this can be called multiple // times, but once called, add() cannot be called again) DataBlock getDigt();};#endif // __DIGT_H
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?