Skip to content

Commit

Permalink
Whitespace checkin
Browse files Browse the repository at this point in the history
  • Loading branch information
noloader committed Sep 10, 2016
1 parent 4414b86 commit 894874f
Show file tree
Hide file tree
Showing 79 changed files with 1,302 additions and 1,302 deletions.
6 changes: 3 additions & 3 deletions algparam.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class GetValueHelperClass

if (!m_found && searchFirst)
m_found = searchFirst->GetVoidValue(m_name, valueType, pValue);

if (!m_found && typeid(T) != typeid(BASE))
m_found = pObject->BASE::GetVoidValue(m_name, valueType, pValue);
}
Expand Down Expand Up @@ -378,7 +378,7 @@ class CRYPTOPP_DLL AlgorithmParametersBase
//! \brief Exception thrown when an AlgorithmParameter is unused
class ParameterNotUsed : public Exception
{
public:
public:
ParameterNotUsed(const char *name) : Exception(OTHER_ERROR, std::string("AlgorithmParametersBase: parameter \"") + name + "\" not used") {}
};

Expand Down Expand Up @@ -417,7 +417,7 @@ class CRYPTOPP_DLL AlgorithmParametersBase
}

bool GetVoidValue(const char *name, const std::type_info &valueType, void *pValue) const;

protected:
friend class AlgorithmParameters;
void operator=(const AlgorithmParametersBase& rhs); // assignment not allowed, declare this for VC60
Expand Down
6 changes: 3 additions & 3 deletions asn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ void OID::BERDecode(BufferedTransformation &bt)

if (!bt.Get(b))
BERDecodeError();

length--;
m_values.resize(2);
m_values[0] = b / 40;
Expand All @@ -292,7 +292,7 @@ void OID::BERDecodeAndCheck(BufferedTransformation &bt) const

inline BufferedTransformation & EncodedObjectFilter::CurrentTarget()
{
if (m_flags & PUT_OBJECTS)
if (m_flags & PUT_OBJECTS)
return *AttachedTransformation();
else
return TheBitBucket();
Expand Down Expand Up @@ -352,7 +352,7 @@ void EncodedObjectFilter::Put(const byte *inString, size_t length)

case TAIL: // silence warnings
case ALL_DONE:
default: ;;
default: ;;
}

if (m_state == IDENTIFIER && m_level == 0)
Expand Down
4 changes: 2 additions & 2 deletions asn.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ CRYPTOPP_DLL size_t CRYPTOPP_API DERLengthEncode(BufferedTransformation &bt, lwo
//! \brief BER decode a length
//! \param bt BufferedTransformation object for reading
//! \param length the decoded size
//! \returns true if the value was decoded
//! \returns true if the value was decoded
//! \throws BERDecodeError if the value fails to decode or is too large for size_t
//! \details BERLengthDecode() returns false if the encoding is indefinite length.
CRYPTOPP_DLL bool CRYPTOPP_API BERLengthDecode(BufferedTransformation &bt, size_t &length);
Expand Down Expand Up @@ -174,7 +174,7 @@ class CRYPTOPP_DLL OID
//! \brief DER encode this OID
//! \param bt BufferedTransformation object
void DEREncode(BufferedTransformation &bt) const;

//! \brief BER decode an OID
//! \param bt BufferedTransformation object
void BERDecode(BufferedTransformation &bt);
Expand Down
10 changes: 5 additions & 5 deletions base64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ void Base64Encoder::IsolatedInitialize(const NameValuePairs &parameters)
int maxLineLength = parameters.GetIntValueWithDefault(Name::MaxLineLength(), 72);

const char *lineBreak = insertLineBreaks ? "\n" : "";

m_filter->Initialize(CombinedNameValuePairs(
parameters,
MakeParameters(Name::EncodingLookupArray(), &s_stdVec[0], false)
Expand All @@ -34,9 +34,9 @@ void Base64URLEncoder::IsolatedInitialize(const NameValuePairs &parameters)
{
bool insertLineBreaks = parameters.GetValueWithDefault(Name::InsertLineBreaks(), true);
int maxLineLength = parameters.GetIntValueWithDefault(Name::MaxLineLength(), 72);

const char *lineBreak = insertLineBreaks ? "\n" : "";

m_filter->Initialize(CombinedNameValuePairs(
parameters,
MakeParameters(Name::EncodingLookupArray(), &s_urlVec[0], false)
Expand All @@ -58,7 +58,7 @@ const int *Base64Decoder::GetDecodingLookupArray()
{
static volatile bool s_initialized = false;
static int s_array[256];

if (!s_initialized)
{
InitializeDecodingLookupArray(s_array, s_stdVec, 64, false);
Expand All @@ -78,7 +78,7 @@ const int *Base64URLDecoder::GetDecodingLookupArray()
{
static volatile bool s_initialized = false;
static int s_array[256];

if (!s_initialized)
{
InitializeDecodingLookupArray(s_array, s_urlVec, 64, false);
Expand Down
8 changes: 4 additions & 4 deletions base64.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class Base64Decoder : public BaseN_Decoder
//! \sa IsolatedInitialize() for an example of modifying an encoder after construction.
Base64Decoder(BufferedTransformation *attachment = NULL)
: BaseN_Decoder(GetDecodingLookupArray(), 6, attachment) {}

//! \brief Initialize or reinitialize this object, without signal propagation
//! \param parameters a set of NameValuePairs used to initialize this object
//! \details IsolatedInitialize() is used to initialize or reinitialize an object using a variable
Expand Down Expand Up @@ -115,7 +115,7 @@ class Base64URLEncoder : public SimpleProxyFilter
CRYPTOPP_UNUSED(insertLineBreaks), CRYPTOPP_UNUSED(maxLineLength);
IsolatedInitialize(MakeParameters(Name::InsertLineBreaks(), false)(Name::MaxLineLength(), -1)(Name::Pad(),false));
}

//! \details IsolatedInitialize() is used to initialize or reinitialize an object using a variable
//! number of arbitrarily typed arguments. IsolatedInitialize() does not call Initialize() on attached
//! transformations. If initialization should be propagated, then use the Initialize() function.
Expand All @@ -141,7 +141,7 @@ class Base64URLDecoder : public BaseN_Decoder
//! \sa Base64Decoder for a decoder that provides a classic alphabet.
Base64URLDecoder(BufferedTransformation *attachment = NULL)
: BaseN_Decoder(GetDecodingLookupArray(), 6, attachment) {}

//! \brief Initialize or reinitialize this object, without signal propagation
//! \param parameters a set of NameValuePairs used to initialize this object
//! \details IsolatedInitialize() is used to initialize or reinitialize an object using a variable
Expand All @@ -150,7 +150,7 @@ class Base64URLDecoder : public BaseN_Decoder
//! \sa Base64Decoder for a decoder that provides a classic alphabet, and Base64URLEncoder::IsolatedInitialize
//! for an example of modifying an encoder after construction.
void IsolatedInitialize(const NameValuePairs &parameters);

private:
//! \brief Provides the default decoding lookup table
//! \return default decoding lookup table
Expand Down
2 changes: 1 addition & 1 deletion basecode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ size_t BaseN_Encoder::Put2(const byte *begin, size_t length, int messageEnd, boo
m_outBuf[i] = m_alphabet[m_outBuf[i]];
}
FILTER_OUTPUT(1, m_outBuf, m_outputBlockSize, 0);

m_bytePos = m_bitPos = 0;
}
}
Expand Down
4 changes: 2 additions & 2 deletions blumshub.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class PublicBlumBlumShub : public RandomNumberGenerator,

bool IsSelfInverting() const {return true;}
bool IsForwardTransformation() const {return true;}

#ifndef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
virtual ~PublicBlumBlumShub() {}
#endif
Expand All @@ -45,7 +45,7 @@ class BlumBlumShub : public PublicBlumBlumShub
// Make sure p and q are both primes congruent to 3 mod 4 and at least 512 bits long,
// seed is the secret key and should be about as big as p*q
BlumBlumShub(const Integer &p, const Integer &q, const Integer &seed);

bool IsRandomAccess() const {return true;}
void Seek(lword index);

Expand Down
4 changes: 2 additions & 2 deletions ccm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void CCM_Base::Resync(const byte *iv, size_t len)
m_ctr.SetCipherWithIV(cipher, m_buffer);

m_ctr.Seek(REQUIRED_BLOCKSIZE);
m_aadLength = 0;
m_aadLength = 0;
m_messageLength = 0;
}

Expand All @@ -53,7 +53,7 @@ void CCM_Base::UncheckedSpecifyDataLengths(lword headerLength, lword messageLeng
if (m_state != State_IVSet)
throw BadState(AlgorithmName(), "SpecifyDataLengths", "or after State_IVSet");

m_aadLength = headerLength;
m_aadLength = headerLength;
m_messageLength = messageLength;

byte *cbcBuffer = CBC_Buffer();
Expand Down
2 changes: 1 addition & 1 deletion channels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ void ChannelSwitch::RemoveRoute(const std::string &inChannel, BufferedTransforma
{
typedef ChannelSwitch::RouteMap::iterator MapIterator;
pair<MapIterator, MapIterator> range = m_routeMap.equal_range(inChannel);

for (MapIterator it = range.first; it != range.second; ++it)
if (it->second.first == &destination && it->second.second == outChannel)
{
Expand Down
6 changes: 3 additions & 3 deletions channels.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ class ChannelRouteIterator : public ChannelSwitchTypedefs
void Next();
BufferedTransformation & Destination();
const std::string & Channel();

ChannelSwitch& m_cs;
std::string m_channel;
bool m_useDefault;
MapIterator m_itMapCurrent, m_itMapEnd;
ListIterator m_itListCurrent, m_itListEnd;

protected:
// Hide this to see if we break something...
ChannelRouteIterator();
Expand Down Expand Up @@ -111,7 +111,7 @@ class CRYPTOPP_DLL ChannelSwitch : public Multichannel<Sink>, public ChannelSwit
bool ChannelMessageSeriesEnd(const std::string &channel, int propagation=-1, bool blocking=true);

byte * ChannelCreatePutSpace(const std::string &channel, size_t &size);

void AddDefaultRoute(BufferedTransformation &destination);
void RemoveDefaultRoute(BufferedTransformation &destination);
void AddDefaultRoute(BufferedTransformation &destination, const std::string &outChannel);
Expand Down
2 changes: 1 addition & 1 deletion cmac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static void MulU(byte *k, unsigned int length)
k[15] ^= 0x87;
break;
case 32:
k[30] ^= 4;
k[30] ^= 4;
k[31] ^= 0x23;
break;
default:
Expand Down
8 changes: 4 additions & 4 deletions dh.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class DH_Domain : public DL_SimpleKeyAgreementDomainBase<typename GROUP_PARAMETE

//! \brief Construct a Diffie-Hellman domain
//! \tparam T2 template parameter used as a constructor parameter
//! \param v1 RandomNumberGenerator derived class
//! \param v1 RandomNumberGenerator derived class
//! \param v2 second parameter
//! \details v1 and v2 are passed directly to the GROUP_PARAMETERS object.
template <class T2>
Expand All @@ -55,7 +55,7 @@ class DH_Domain : public DL_SimpleKeyAgreementDomainBase<typename GROUP_PARAMETE
//! \brief Construct a Diffie-Hellman domain
//! \tparam T2 template parameter used as a constructor parameter
//! \tparam T3 template parameter used as a constructor parameter
//! \param v1 RandomNumberGenerator derived class
//! \param v1 RandomNumberGenerator derived class
//! \param v2 second parameter
//! \param v3 third parameter
//! \details v1, v2 and v3 are passed directly to the GROUP_PARAMETERS object.
Expand All @@ -67,7 +67,7 @@ class DH_Domain : public DL_SimpleKeyAgreementDomainBase<typename GROUP_PARAMETE
//! \tparam T2 template parameter used as a constructor parameter
//! \tparam T3 template parameter used as a constructor parameter
//! \tparam T4 template parameter used as a constructor parameter
//! \param v1 RandomNumberGenerator derived class
//! \param v1 RandomNumberGenerator derived class
//! \param v2 second parameter
//! \param v3 third parameter
//! \param v4 fourth parameter
Expand Down Expand Up @@ -152,7 +152,7 @@ class DH_Domain : public DL_SimpleKeyAgreementDomainBase<typename GROUP_PARAMETE
static std::string CRYPTOPP_API StaticAlgorithmName()
{return GroupParameters::StaticAlgorithmNamePrefix() + DH_Algorithm::StaticAlgorithmName();}
std::string AlgorithmName() const {return StaticAlgorithmName();}

#ifndef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
virtual ~DH_Domain() {}
#endif
Expand Down
2 changes: 1 addition & 1 deletion dh2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ void DH2_TestInstantiations()
#endif

bool DH2::Agree(byte *agreedValue,
const byte *staticSecretKey, const byte *ephemeralSecretKey,
const byte *staticSecretKey, const byte *ephemeralSecretKey,
const byte *staticOtherPublicKey, const byte *ephemeralOtherPublicKey,
bool validateStaticOtherPublicKey) const
{
Expand Down
2 changes: 1 addition & 1 deletion dh2.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class DH2 : public AuthenticatedKeyAgreementDomain
{d2.GenerateKeyPair(rng, privateKey, publicKey);}

bool Agree(byte *agreedValue,
const byte *staticPrivateKey, const byte *ephemeralPrivateKey,
const byte *staticPrivateKey, const byte *ephemeralPrivateKey,
const byte *staticOtherPublicKey, const byte *ephemeralOtherPublicKey,
bool validateStaticOtherPublicKey=true) const;

Expand Down
2 changes: 1 addition & 1 deletion dsa.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ enum DSASignatureFormat {
//! \details This function converts between these formats, and returns length
//! of signature in the target format. If <tt>toFormat == DSA_P1363</tt>, then
//! <tt>bufferSize</tt> must equal <tt>publicKey.SignatureLength()</tt>
size_t DSAConvertSignatureFormat(byte *buffer, size_t bufferSize, DSASignatureFormat toFormat,
size_t DSAConvertSignatureFormat(byte *buffer, size_t bufferSize, DSASignatureFormat toFormat,
const byte *signature, size_t signatureLen, DSASignatureFormat fromFormat);

NAMESPACE_END
Expand Down
6 changes: 3 additions & 3 deletions ec2n.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ bool EC2N::DecodePoint(EC2N::Point &P, BufferedTransformation &bt, size_t encode
return false;

P.identity = false;
P.x.Decode(bt, m_field->MaxElementByteLength());
P.x.Decode(bt, m_field->MaxElementByteLength());

if (P.x.IsZero())
{
Expand Down Expand Up @@ -148,14 +148,14 @@ bool EC2N::ValidateParameters(RandomNumberGenerator &rng, unsigned int level) co

if (level >= 1)
pass = pass && m_field->GetModulus().IsIrreducible();

return pass;
}

bool EC2N::VerifyPoint(const Point &P) const
{
const FieldElement &x = P.x, &y = P.y;
return P.identity ||
return P.identity ||
(x.CoefficientCount() <= m_field->MaxElementBitLength()
&& y.CoefficientCount() <= m_field->MaxElementBitLength()
&& !(((x+m_a)*x*x+m_b-(x+y)*y)%m_field->GetModulus()));
Expand Down
6 changes: 3 additions & 3 deletions ec2n.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct CRYPTOPP_DLL EC2NPoint
{return (identity && t.identity) || (!identity && !t.identity && x==t.x && y==t.y);}
bool operator< (const EC2NPoint &t) const
{return identity ? !t.identity : (!t.identity && (x<t.x || (x==t.x && y<t.y)));}

#ifndef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
virtual ~EC2NPoint() {}
#endif
Expand Down Expand Up @@ -91,7 +91,7 @@ class CRYPTOPP_DLL EC2N : public AbstractGroup<EC2NPoint>

bool operator==(const EC2N &rhs) const
{return GetField() == rhs.GetField() && m_a == rhs.m_a && m_b == rhs.m_b;}

#ifndef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
virtual ~EC2N() {}
#endif
Expand Down Expand Up @@ -121,7 +121,7 @@ template<> class EcPrecomputation<EC2N> : public DL_GroupPrecomputation<EC2N::Po
// non-inherited
void SetCurve(const EC2N &ec) {m_ec = ec;}
const EC2N & GetCurve() const {return m_ec;}

#ifndef CRYPTOPP_MAINTAIN_BACKWARDS_COMPATIBILITY_562
virtual ~EcPrecomputation() {}
#endif
Expand Down
Loading

0 comments on commit 894874f

Please sign in to comment.