00001 #pragma once 00002 00034 #include <wincrypt.h> 00035 #include "TBits.h" 00036 00037 namespace AxPipe { 00038 namespace Stock { 00048 class CPipeSHA1 : public CPipe { 00049 unsigned __int64 m_cb; 00050 protected: 00051 HCRYPTPROV m_hCryptProv; 00052 HCRYPTHASH m_hHash; 00053 TBits<160> m_Hash; 00054 00055 void Out(AxPipe::CSeg *pSeg); 00056 bool OutOpen(); 00057 bool OutClose(); 00058 public: 00059 CPipeSHA1(); 00060 virtual ~CPipeSHA1(); 00061 00062 unsigned __int64 CountBytes(); 00063 unsigned char *GetHash(); 00064 }; 00065 } 00066 }