請小例子。我試過在文檔中使用這個,但我無法理解如何。如何連接兩個字節*(secblock)與運算符'secblock <T, A> :: operator + ='
消息:
main.cpp|97|error: no matching function for call to
'CryptoPP::SecBlock<unsigned char>::operator+=(CryptoPP::SecBlock<unsigned char>*)'
secblock.h|568|note: candidate:
CryptoPP::SecBlock<T, A>& CryptoPP::SecBlock<T, A>::operator+=(const CryptoPP::SecBlock<T, A>&)
[with T = unsigned char; A = CryptoPP::AllocatorWithCleanup<unsigned char>]
secblock.h|568|note:
no known conversion for argument 1 from 'CryptoPP::SecBlock<unsigned char>*'
to 'const CryptoPP::SecBlock<unsigned char>&'
我的代碼:
SecBlock<byte, AllocatorWithCleanup<byte> > hash_ripemd160_temp;
RIPEMD160().CalculateDigest(hash_ripemd160_temp, hash_sha256, 32);
SecBlock<byte, AllocatorWithCleanup<byte> > hash_ripemd160 = L0_byte;
hash_ripemd160 = SecBlock< byte , AllocatorWithCleanup<byte > >::operator+= (&hash_ripemd160_temp);
在文檔是:在文件secblock.h的568線
SecBlock<byte , AllocatorWithCleanup<byte > >& SecBlock< byte , AllocatorWithCleanup<byte > >::operator+= (const SecBlock< byte , AllocatorWithCleanup<byte > > &t)
Append contents from another SecBlock.
Parameters
t the other SecBlock
Internally, this SecBlock calls Grow and then copies the new content.
If the memory block is reduced in size, then the unused area is set to 0.
定義。
Вадим和Alan ...再次感謝您對此問題的幫助。這真的讓我很煩惱,我們沒有及時趕上。我將重新評估我們的工程過程,以期在事後分析中尋找差距。 – jww