From 1dc772c91103577749fa4c754be6d434f1d9e505 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Fri, 14 May 2004 02:17:03 +0000 Subject: [PATCH] unused stuff --- stepmania/src/crypto51/integer.cpp | 30 ------------------------------ stepmania/src/crypto51/integer.h | 15 --------------- 2 files changed, 45 deletions(-) diff --git a/stepmania/src/crypto51/integer.cpp b/stepmania/src/crypto51/integer.cpp index 3999edce98..17c77f5fdb 100644 --- a/stepmania/src/crypto51/integer.cpp +++ b/stepmania/src/crypto51/integer.cpp @@ -19,7 +19,6 @@ #endif #include "algebra.cpp" -#include "eprecomp.cpp" NAMESPACE_BEGIN(CryptoPP) @@ -31,8 +30,6 @@ bool FunctionAssignIntToInteger(const std::type_info &valueType, void *pInteger, return true; } -static int DummyAssignIntToInteger = (AssignIntToInteger = FunctionAssignIntToInteger, 0); - #ifdef SSE2_INTRINSICS_AVAILABLE template AllocatorBase::pointer AlignedAllocator::allocate(size_type n, const void *) @@ -2878,33 +2875,6 @@ void Integer::BERDecodeAsOctetString(BufferedTransformation &bt, unsigned int le dec.MessageEnd(); } -unsigned int Integer::OpenPGPEncode(byte *output, unsigned int len) const -{ - ArraySink sink(output, len); - return OpenPGPEncode(sink); -} - -unsigned int Integer::OpenPGPEncode(BufferedTransformation &bt) const -{ - word16 bitCount = BitCount(); - bt.PutWord16(bitCount); - return 2 + Encode(bt, BitsToBytes(bitCount)); -} - -void Integer::OpenPGPDecode(const byte *input, unsigned int len) -{ - StringStore store(input, len); - OpenPGPDecode(store); -} - -void Integer::OpenPGPDecode(BufferedTransformation &bt) -{ - word16 bitCount; - if (bt.GetWord16(bitCount) != 2 || bt.MaxRetrievable() < BitsToBytes(bitCount)) - throw OpenPGPDecodeErr(); - Decode(bt, BitsToBytes(bitCount)); -} - void Integer::Randomize(RandomNumberGenerator &rng, unsigned int nbits) { const unsigned int nbytes = nbits/8 + 1; diff --git a/stepmania/src/crypto51/integer.h b/stepmania/src/crypto51/integer.h index fcf3ebefff..312ebdfa8e 100644 --- a/stepmania/src/crypto51/integer.h +++ b/stepmania/src/crypto51/integer.h @@ -162,11 +162,6 @@ public: //! encode absolute value as big-endian octet string void DEREncodeAsOctetString(BufferedTransformation &bt, unsigned int length) const; - //! encode absolute value in OpenPGP format, return length of output - unsigned int OpenPGPEncode(byte *output, unsigned int bufferSize) const; - //! encode absolute value in OpenPGP format, put result into a BufferedTransformation object - unsigned int OpenPGPEncode(BufferedTransformation &bt) const; - //! void Decode(const byte *input, unsigned int inputLen, Signedness=UNSIGNED); //! @@ -181,16 +176,6 @@ public: //! decode nonnegative value as big-endian octet string void BERDecodeAsOctetString(BufferedTransformation &bt, unsigned int length); - class OpenPGPDecodeErr : public Exception - { - public: - OpenPGPDecodeErr() : Exception(INVALID_DATA_FORMAT, "OpenPGP decode error") {} - }; - - //! - void OpenPGPDecode(const byte *input, unsigned int inputLen); - //! - void OpenPGPDecode(BufferedTransformation &bt); //@} //! \name ACCESSORS