Changeset 3098
- Timestamp:
- Sep 18, 2007, 4:56:53 PM (15 years ago)
- Location:
- branches/encryption/libtransmission
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/encryption/libtransmission/crypto.c
r2985 r3098 204 204 } 205 205 206 207 #if 0208 void209 tr_cryptoReadUint16( tr_crypto * crypto,210 struct evbuffer * inbuf,211 uint16_t * setme )212 {213 uint16_t tmp;214 assert( EVBUFFER_LENGTH(inbuf) >= sizeof(uint16_t) );215 evbuffer_remove( inbuf, &tmp, sizeof(uint16_t) );216 tr_cryptoDecrypt( crypto, sizeof(uint16_t), &tmp, &tmp );217 *setme = ntohs( tmp );218 }219 220 void221 tr_cryptoReadUint32( tr_crypto * crypto,222 struct evbuffer * inbuf,223 uint32_t * setme )224 {225 uint32_t tmp;226 assert( EVBUFFER_LENGTH(inbuf) >= sizeof(uint32_t) );227 evbuffer_remove( inbuf, &tmp, sizeof(uint32_t) );228 tr_cryptoDecrypt( crypto, sizeof(uint32_t), &tmp, &tmp );229 *setme = ntohl( tmp );230 }231 232 void233 tr_cryptoReadBytes( tr_crypto * crypto,234 struct evbuffer * inbuf,235 uint8_t * bytes,236 int byteCount )237 {238 assert( (int)EVBUFFER_LENGTH(inbuf) >= byteCount );239 evbuffer_remove( inbuf, bytes, byteCount );240 tr_cryptoDecrypt( crypto, byteCount, bytes, bytes );241 }242 #endif243 244 /**245 ***246 **/247 248 206 void 249 207 tr_cryptoEncryptInit( tr_crypto * crypto ) -
branches/encryption/libtransmission/peer-mgr.c
r3095 r3098 399 399 tr_free( req ); 400 400 tr_free( unreq ); 401 tr_free( pieces ); 401 402 402 403 return ret;
Note: See TracChangeset
for help on using the changeset viewer.