6 #ifndef CRYPTOPP_IMPORTS
8 NAMESPACE_BEGIN(CryptoPP)
11 const byte *recoverableMessage,
size_t recoverableMessageLength,
13 byte *representative,
size_t representativeBitLength)
const
15 assert(representativeBitLength >= MinRepresentativeBitLength(hashIdentifier.second, hash.DigestSize()));
17 if (representativeBitLength % 8 != 7)
20 size_t digestSize = hash.DigestSize();
21 size_t representativeByteLength = BitsToBytes(representativeBitLength);
23 representative[0] = messageEmpty ? 0x4b : 0x6b;
24 memset(representative+1, 0xbb, representativeByteLength-digestSize-4);
25 byte *afterP2 = representative+representativeByteLength-digestSize-3;
27 hash.Final(afterP2+1);
28 representative[representativeByteLength-2] = *hashIdentifier.first;
29 representative[representativeByteLength-1] = 0xcc;