6 #ifndef CRYPTOPP_IMPORTS 11 const
byte* recoverableMessage,
size_t recoverableMessageLength,
13 byte *representative,
size_t representativeBitLength)
const 16 CRYPTOPP_ASSERT(representativeBitLength >= MinRepresentativeBitLength(hashIdentifier.second, hash.DigestSize()));
18 if (representativeBitLength % 8 != 7)
21 size_t digestSize = hash.DigestSize();
22 size_t representativeByteLength =
BitsToBytes(representativeBitLength);
24 representative[0] = messageEmpty ? 0x4b : 0x6b;
25 memset(representative+1, 0xbb, representativeByteLength-digestSize-4);
26 byte *afterP2 = representative+representativeByteLength-digestSize-3;
28 hash.Final(afterP2+1);
29 representative[representativeByteLength-2] = *hashIdentifier.first;
30 representative[representativeByteLength-1] = 0xcc;
Classes and functions for various padding schemes used in public key algorithms.
size_t BitsToBytes(size_t bitCount)
Returns the number of 8-bit bytes or octets required for the specified number of bits.
#define NAMESPACE_BEGIN(x)
Interface for random number generators.
Exception throw when the private or public key has a length that can't be used.
#define CRYPTOPP_ASSERT(exp)
#define CRYPTOPP_UNUSED(x)
std::pair< const byte *, unsigned int > HashIdentifier