D:/opendownloadmanager/ODM-1.x/Bittorrent/libtorrent-0.12/src/sha1.cpp File Reference

#include <cstdio>
#include <cstring>
#include <boost/cstdint.hpp>
#include "libtorrent/config.hpp"

Go to the source code of this file.

Classes

struct  SHA1_CTX

Defines

#define rol(value, bits)   (((value) << (bits)) | ((value) >> (32 - (bits))))
#define blk(i)
#define R0(v, w, x, y, z, i)   z+=((w&(x^y))^y)+BlkFun::apply(block, i)+0x5A827999+rol(v,5);w=rol(w,30);
#define R1(v, w, x, y, z, i)   z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5);w=rol(w,30);
#define R2(v, w, x, y, z, i)   z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30);
#define R3(v, w, x, y, z, i)   z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30);
#define R4(v, w, x, y, z, i)   z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30);

Functions

TORRENT_EXPORT void SHA1Init (SHA1_CTX *context)
TORRENT_EXPORT void SHA1Update (SHA1_CTX *context, uint8_t const *data, uint32_t len)
TORRENT_EXPORT void SHA1Final (SHA1_CTX *context, uint8_t *digest)
template<class BlkFun>
void SHA1Transform (uint32_t state[5], uint8_t const buffer[64])
void SHAPrintContext (SHA1_CTX *context, char *msg)
template<class BlkFun>
void internal_update (SHA1_CTX *context, uint8_t const *data, uint32_t len)
bool is_big_endian ()


Define Documentation

#define blk (  ) 

Value:

(block->l[i&15] = rol(block->l[(i+13)&15]^block->l[(i+8)&15] \
    ^block->l[(i+2)&15]^block->l[i&15],1))

Definition at line 55 of file sha1.cpp.

#define R0 ( v,
w,
x,
y,
z,
 )     z+=((w&(x^y))^y)+BlkFun::apply(block, i)+0x5A827999+rol(v,5);w=rol(w,30);

Definition at line 58 of file sha1.cpp.

Referenced by SHA1Transform().

#define R1 ( v,
w,
x,
y,
z,
 )     z+=((w&(x^y))^y)+blk(i)+0x5A827999+rol(v,5);w=rol(w,30);

Definition at line 59 of file sha1.cpp.

Referenced by SHA1Transform().

#define R2 ( v,
w,
x,
y,
z,
 )     z+=(w^x^y)+blk(i)+0x6ED9EBA1+rol(v,5);w=rol(w,30);

Definition at line 60 of file sha1.cpp.

Referenced by SHA1Transform().

#define R3 ( v,
w,
x,
y,
z,
 )     z+=(((w|x)&y)|(w&x))+blk(i)+0x8F1BBCDC+rol(v,5);w=rol(w,30);

Definition at line 61 of file sha1.cpp.

Referenced by SHA1Transform().

#define R4 ( v,
w,
x,
y,
z,
 )     z+=(w^x^y)+blk(i)+0xCA62C1D6+rol(v,5);w=rol(w,30);

Definition at line 62 of file sha1.cpp.

Referenced by SHA1Transform().

#define rol ( value,
bits   )     (((value) << (bits)) | ((value) >> (32 - (bits))))

Definition at line 36 of file sha1.cpp.


Function Documentation

template<class BlkFun>
void @287::internal_update ( SHA1_CTX context,
uint8_t const *  data,
uint32_t  len 
) [inline, static]

Definition at line 124 of file sha1.cpp.

References SHA1_CTX::buffer, SHA1_CTX::count, SHAPrintContext(), and SHA1_CTX::state.

bool @287::is_big_endian (  )  [static]

Definition at line 155 of file sha1.cpp.

Referenced by SHA1Update().

void SHA1Final ( SHA1_CTX context,
uint8_t digest 
)

Definition at line 189 of file sha1.cpp.

References SHA1_CTX::count, SHA1Update(), and SHA1_CTX::state.

TORRENT_EXPORT void SHA1Init ( SHA1_CTX context  ) 

template<class BlkFun>
void @287::SHA1Transform ( uint32_t  state[5],
uint8_t const   buffer[64] 
) [inline, static]

Definition at line 66 of file sha1.cpp.

References a, b, c, simple_client::e, R0, R1, R2, R3, and R4.

void SHA1Update ( SHA1_CTX context,
uint8_t const *  data,
uint32_t  len 
)

Definition at line 173 of file sha1.cpp.

References is_big_endian().

void @287::SHAPrintContext ( SHA1_CTX context,
char *  msg 
) [static]

Definition at line 113 of file sha1.cpp.

References SHA1_CTX::count, and SHA1_CTX::state.

Referenced by internal_update().


Variable Documentation

uint8_t c[64]

Definition at line 32 of file sha1.cpp.

Referenced by CListCtrlEx::AddItem(), libtorrent::aux::session_impl::async_accept(), base64_decode(), base64_encode(), check_header(), libtorrent::torrent::connect_to_peer(), vmsBatchList::CreateAZBatch(), Curl_close(), Curl_cookie_init(), Curl_cookie_list(), Curl_getinfo(), Curl_mk_connc(), des_encrypt(), des_set_key(), asio::detail::task_io_service< Task >::do_one(), fsURL::Encode(), vmsMaliciousDownloadChecker::EncodeUrl(), EnhancedMaskTest(), vmsVideoSiteHtmlCodeParser::ExtractValue(), libtorrent::policy::find_choke_candidate(), libtorrent::policy::find_disconnect_candidate(), libtorrent::policy::find_seed_choke_candidate(), libtorrent::policy::find_seed_unchoke_candidate(), libtorrent::policy::find_unchoke_candidate(), fsDecodeHtmlUrl(), vmsMozillaPrefs::get_Value(), getLong(), fsSitesMgr::GetTempSiteCount(), gzgetc(), hostcache_timestamp_remove(), vmsStringList::Load(), vmsFileRecentList::Load(), MD5_Transform(), MD5Transform(), NWindows::NFile::NFind::MyGetLogicalDriveStrings(), libtorrent::bandwidth_manager::on_history_expire(), libtorrent::torrent::on_name_lookup(), CSchedule_WTSPage::OnInitDialog(), libtorrent::operator>>(), CBaseFilter::Pause(), libtorrent::aux::session_impl::process_connection_queue(), libtorrent::policy::pulse(), CBaseInputPin::ReceiveCanBlock(), vmsFdmWebInterfaceServer::RequestCreateNewDownload(), CBaseFilter::Run(), vmsStringList::Save(), vmsFileRecentList::Save(), libtorrent::aux::session_impl::second_tick(), libtorrent::piece_picker::set_sequenced_download_threshold(), sha1_compile(), SHA1Transform(), SplitPathToParts(), SplitString(), CBaseFilter::Stop(), telrcv(), and libtorrent::bt_peer_connection::write_bitfield().

uint32_t l[16]

Definition at line 33 of file sha1.cpp.

Referenced by libtorrent::aux::session_impl::abort(), libtorrent::tracker_manager::abort_all_requests(), libtorrent::aux::session_impl::add_dht_node(), libtorrent::aux::session_impl::add_dht_router(), libtorrent::aux::session_impl::add_torrent(), libtorrent::peer_connection::assign_bandwidth(), libtorrent::torrent::assign_bandwidth(), libtorrent::call_member(), libtorrent::catch(), libtorrent::aux::session_impl::close_connection(), libtorrent::torrent_handle::connect_peer(), libtorrent::aux::session_impl::connection_completed(), libtorrent::aux::session_impl::connection_failed(), entry_from_python::construct0(), Curl_hash_add(), Curl_hash_delete(), Curl_hash_pick(), Curl_splay(), des_encrypt(), libtorrent::aux::session_impl::dht_state(), libtorrent::torrent::disconnect_all(), libtorrent::aux::session_impl::download_rate_limit(), libtorrent::tracker_manager::empty(), libtorrent::peer_connection::expire_bandwidth(), libtorrent::torrent::expire_bandwidth(), libtorrent::torrent_handle::file_progress(), libtorrent::torrent::files_checked(), vmsIETmpCookies::Find(), libtorrent::torrent_handle::force_reannounce(), libtorrent::torrent_handle::get_download_queue(), libtorrent::torrent_handle::get_peer_info(), libtorrent::aux::session_impl::get_torrents(), libtorrent::bandwidth_manager::hand_out_bandwidth(), libtorrent::piece_manager::impl::identify_data(), libtorrent::intrusive_ptr_add_ref(), libtorrent::intrusive_ptr_release(), libtorrent::aux::session_impl::is_listening(), libtorrent::torrent_handle::is_valid(), fsWebPageDownloader::IsURLShouldBeIgnored(), libtorrent::aux::session_impl::listen_on(), libtorrent::aux::session_impl::listen_port(), vmsImage::Load(), libtorrent::aux::session_impl::num_connections(), libtorrent::aux::session_impl::num_uploads(), libtorrent::peer_connection::on_connection_complete(), libtorrent::torrent::on_name_lookup(), libtorrent::torrent::on_peer_name_lookup(), libtorrent::torrent::on_proxy_name_lookup(), libtorrent::web_peer_connection::on_receive(), libtorrent::peer_connection::on_receive_data(), libtorrent::peer_connection::on_send_data(), fsPartMediaPlayer::Open2(), libtorrent::file_pool::open_file(), libtorrent::aux::session_impl::operator()(), libtorrent::aux::checker_impl::operator()(), libtorrent::http_tracker_connection::parse(), libtorrent::aux::piece_checker_data::parse_resume_data(), fsWebPageDownloader::ParseHTMLFrameUrls(), libtorrent::aux::session_impl::pop_alert(), CAsyncIo::ProcessRequests(), libtorrent::tracker_manager::queue_request(), libtorrent::torrent_info::read_torrent_info(), vmsFileUtil::ReadString(), libtorrent::file_pool::release(), libtorrent::tracker_manager::remove_request(), libtorrent::aux::session_impl::remove_torrent(), fsDownloadMgr::RenameFile(), libtorrent::file_pool::resize(), libtorrent::aux::session_impl::second_tick(), libtorrent::aux::session_impl::set_dht_settings(), libtorrent::aux::session_impl::set_download_rate_limit(), libtorrent::aux::session_impl::set_ip_filter(), libtorrent::aux::session_impl::set_key(), libtorrent::aux::session_impl::set_max_connections(), libtorrent::aux::session_impl::set_max_half_open_connections(), libtorrent::aux::session_impl::set_max_uploads(), libtorrent::aux::session_impl::set_peer_id(), libtorrent::aux::session_impl::set_settings(), libtorrent::aux::session_impl::set_severity_level(), libtorrent::aux::session_impl::set_upload_rate_limit(), fsHttpFile::SetAdditionalHeaders(), libtorrent::peer_connection::setup_receive(), libtorrent::peer_connection::setup_send(), sha2_begin(), libtorrent::aux::session_impl::start_dht(), libtorrent::aux::session_impl::status(), libtorrent::torrent_handle::status(), libtorrent::aux::session_impl::stop_dht(), test_main(), libtorrent::bandwidth_manager::throttle(), libtorrent::torrent::tracker_request_error(), libtorrent::torrent::tracker_request_timed_out(), libtorrent::torrent::tracker_response(), libtorrent::torrent::tracker_warning(), libtorrent::aux::session_impl::upload_rate_limit(), libtorrent::torrent_handle::write_resume_data(), vmsFileUtil::WriteString(), and libtorrent::aux::session_impl::~session_impl().


Generated on Sun May 25 00:19:43 2008 by  doxygen 1.5.6