Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

CSHA Class Reference

#include <SHA.h>

List of all members.

Public Member Functions

 CSHA ()
 ~CSHA ()
void Reset ()
void Add (LPCVOID pData, DWORD nLength)
void Finish ()
void GetHash (SHA1 *pHash)
CString GetHashString (BOOL bURN=FALSE)

Static Public Member Functions

static CString HashToString (const SHA1 *pHash, BOOL bURN=FALSE)
static CString HashToHexString (const SHA1 *pHash, BOOL bURN=FALSE)
static BOOL HashFromString (LPCTSTR pszHash, SHA1 *pHash)
static BOOL HashFromURN (LPCTSTR pszHash, SHA1 *pHash)
static BOOL IsNull (SHA1 *pHash)

Public Attributes

DWORD m_nCount [2]
DWORD m_nHash [5]
DWORD m_nBuffer [16]


Constructor & Destructor Documentation

CSHA::CSHA  ) 
 

Definition at line 56 of file SHA.cpp.

References Reset().

CSHA::~CSHA  ) 
 

Definition at line 61 of file SHA.cpp.


Member Function Documentation

void CSHA::Add LPCVOID  pData,
DWORD  nLength
 

Definition at line 83 of file SHA.cpp.

References SHA_Add_p5().

Referenced by CBTInfo::AddToTest(), CPacket::GetRazaHash(), CG1Packet::GetRazaHash(), CBENode::GetSHA1(), CLibraryBuilder::HashFile(), CRemoteSettingsPage::OnNewPassword(), and CRemote::PageLogin().

void CSHA::Finish  ) 
 

Definition at line 89 of file SHA.cpp.

References asm_m_nCount, m_nCount, SHA_Add_p5(), and SHA_PADDING.

Referenced by CBTInfo::FinishBlockTest(), CPacket::GetRazaHash(), CG1Packet::GetRazaHash(), CBENode::GetSHA1(), CLibraryBuilder::HashFile(), CRemoteSettingsPage::OnNewPassword(), and CRemote::PageLogin().

void CSHA::GetHash SHA1 pHash  ) 
 

Definition at line 75 of file SHA.cpp.

References SHA1::b, m_nHash, and SHA1_DIGEST_SIZE.

Referenced by CBTInfo::FinishBlockTest(), GetHashString(), CPacket::GetRazaHash(), CG1Packet::GetRazaHash(), CBENode::GetSHA1(), and CLibraryBuilder::HashFile().

CString CSHA::GetHashString BOOL  bURN = FALSE  ) 
 

Definition at line 115 of file SHA.cpp.

References GetHash(), and HashToString().

Referenced by CRemoteSettingsPage::OnNewPassword(), and CRemote::PageLogin().

BOOL CSHA::HashFromString LPCTSTR  pszHash,
SHA1 pHash
[static]
 

Definition at line 192 of file SHA.cpp.

Referenced by CDownloadEditDlg::Commit(), HashFromURN(), CUpgradeDlg::OnOK(), CIEProtocol::OnRequestRAZACOL(), CSourceURL::ParseBTC(), and CShareazaURL::ParsePioletFile().

BOOL CSHA::HashFromURN LPCTSTR  pszHash,
SHA1 pHash
[static]
 

Definition at line 233 of file SHA.cpp.

References HashFromString(), and NULL.

Referenced by CQuerySearch::BuildWordList(), CSearchDetailPanel::ExecuteRequest(), CDownloads::FindByURN(), CCollectionFile::FindByURN(), CUploadTransfer::HashesFromURN(), CLibraryMaps::LookupFileByURN(), CNewSearchDlg::OnChangeSearch(), CDownloadTransferHTTP::OnHeaderLine(), CCollectionFile::File::Parse(), CSourceURL::ParseHTTP(), CShareazaURL::ParseMagnet(), CShareazaURL::ParseShareazaFile(), CQuerySearch::ReadG1Packet(), and CQueryHit::ReadG1Packet().

CString CSHA::HashToHexString const SHA1 pHash,
BOOL  bURN = FALSE
[static]
 

Definition at line 168 of file SHA.cpp.

Referenced by CTorrentSeedDlg::CreateTarget(), and CFilePropertiesDlg::Update().

CString CSHA::HashToString const SHA1 pHash,
BOOL  bURN = FALSE
[static]
 

Definition at line 125 of file SHA.cpp.

Referenced by CLibraryDictionary::Add(), CLibraryFile::AddAlternateSources(), CMatchFile::Added(), CLocalSearch::AddHit(), CLocalSearch::AddHitG1(), CDownloadWithSources::AddSourceURLs(), CQueryHashMaster::Build(), CLibraryDictionary::BuildHashTable(), CBitziDownloader::BuildRequest(), CLibraryDetailView::CacheItem(), CDownloadSource::CDownloadSource(), CExistingFileDlg::CExistingFileDlg(), CQueryHashTable::Check(), CVersionChecker::CheckUpgradeHash(), CCollectionExportDlg::CreateXML(), CDownloadBase::GenerateLocalName(), CDownloadWithFile::GetDisplayName(), GetHashString(), CMatchListView::GetNext(), CMatchFile::GetURN(), CMatchTipCtrl::LoadFromFile(), CMatchTipCtrl::LoadFromHit(), CURLExportDlg::OnCopy(), CUploadTransferHTTP::OnHeadersComplete(), CURLCopyDlg::OnIncludeSelf(), CFileGeneralPage::OnInitDialog(), CNewSearchDlg::OnInitDialog(), CDownloadEditDlg::OnInitDialog(), CBaseMatchWnd::OnLibraryBitziWeb(), CLibraryTipCtrl::OnPrepare(), CSearchMonitorWnd::OnQuerySearch(), CURLExportDlg::OnSave(), CDownloadTipCtrl::PrepareFileInfo(), CUploadTransferHTTP::RequestPreview(), CUploadTransferHTTP::RequestSharedFile(), CQueryHit::Resolve(), CUploadTransferHTTP::SendFileHeaders(), CDownloadTransferHTTP::SendRequest(), CUploadTransferHTTP::SendResponse(), CFileExecutor::ShowBitziTicket(), CLibraryCollectionView::ShowCollection(), CQuerySearch::ToG1Packet(), CURLActionDlg::Update(), CFilePropertiesDlg::Update(), CSearchDetailPanel::Update(), and CSearchWnd::UpdateMessages().

BOOL CSHA::IsNull SHA1 pHash  )  [static]
 

Definition at line 260 of file SHA.cpp.

Referenced by CQueryHit::ReadG1Packet(), CQueryHit::ReadG2Packet(), and CDownloadBase::Serialize().

void CSHA::Reset  ) 
 

Definition at line 65 of file SHA.cpp.

References m_nCount, and m_nHash.

Referenced by CBTInfo::BeginBlockTest(), and CSHA().


Member Data Documentation

DWORD CSHA::m_nBuffer[16]
 

Definition at line 38 of file SHA.h.

DWORD CSHA::m_nCount[2]
 

Definition at line 36 of file SHA.h.

Referenced by Finish(), and Reset().

DWORD CSHA::m_nHash[5]
 

Definition at line 37 of file SHA.h.

Referenced by GetHash(), and Reset().


The documentation for this class was generated from the following files:
Generated on Thu Dec 15 10:40:12 2005 for Shareaza 2.2.1.0 by  doxygen 1.4.2