Changeset 47bcf6f in nscp for include/nsca
- Timestamp:
- 02/14/10 08:47:11 (3 years ago)
- Branches:
- master, 0.4.0, 0.4.1, 0.4.2
- Children:
- 60375ed
- Parents:
- 40970de
- File:
-
- 1 edited
-
include/nsca/nsca_enrypt.hpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
include/nsca/nsca_enrypt.hpp
r40970de r47bcf6f 92 92 } 93 93 94 virtual void init(std::string password, std::string iv) { 95 init(password, (unsigned char*)&*iv.begin(), iv.size()); 96 97 } 94 98 void init(std::string password, unsigned char *transmitted_iv, int iv_size) { 95 99 /* generate an encryption/description key using the password */ … … 127 131 delete [] iv; 128 132 delete [] key; 133 } 134 void encrypt(std::string &buffer) { 135 encrypt((unsigned char*)&*buffer.begin(), buffer.size()); 129 136 } 130 137 void encrypt(unsigned char *buffer, int buffer_size) { … … 136 143 throw encryption_exception(_T("Unknown exception when trying to setup crypto")); 137 144 } 145 } 146 void decrypt(std::string &buffer) { 147 decrypt((unsigned char*)&*buffer.begin(), buffer.size()); 138 148 } 139 149 void decrypt(unsigned char *buffer, int buffer_size) { … … 328 338 #if HAVE_LIBCRYPTOPP 329 339 CryptoPP::AutoSeededRandomPool rng; 330 rng.GenerateBlock( buffer, length);340 rng.GenerateBlock((byte*)&*buffer.begin(), length); 331 341 #endif 332 342 return buffer;
Note: See TracChangeset
for help on using the changeset viewer.








