5 #ifndef CRYPTOPP_IMPORTS
10 NAMESPACE_BEGIN(CryptoPP)
21 r.Decode(store, signatureLen/2);
22 s.Decode(store, signatureLen/2);
33 r.OpenPGPDecode(store);
34 s.OpenPGPDecode(store);
41 r.
Encode(sink, bufferSize/2);
42 s.
Encode(sink, bufferSize/2);
58 return (
size_t)sink.TotalPutLength();
71 const int n = (L-1) / 160;
72 const int b = (L-1) % 160;
77 for (
int i=g/8-1, carry=
true; i>=0 && carry; i--)
81 xorbuf(U, temp, SHA::DIGESTSIZE);
84 U[SHA::DIGESTSIZE-1] |= 1;
85 q.Decode(U, SHA::DIGESTSIZE);
90 int counterEnd = useInputCounterValue ? counter+1 : 4096;
92 for (
int c = 0; c < counterEnd; c++)
94 for (
int k=0; k<=n; k++)
96 for (
int i=g/8-1, carry=
true; i>=0 && carry; i--)
98 if (!useInputCounterValue || c == counter)
101 if (!useInputCounterValue || c == counter)
103 W[SHA::DIGESTSIZE - 1 - b/8] |= 0x80;
104 X.Decode(W + SHA::DIGESTSIZE - 1 - b/8, L/8);
105 p = X-((X % (2*q))-1);
107 if (p.
GetBit(L-1) && IsPrime(p))