diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2005-07-12 04:23:32 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2005-07-12 04:23:32 +0000 |
commit | d5ebf62bed594d1fe6ab616a6bbcbcf0a5892d47 (patch) | |
tree | 4b03760892a97a9bc452ebe8b7793bbebd402ad4 /panama.h | |
parent | fa39f51809b4da54a5c2adb3e183b1a625cefb92 (diff) | |
download | cryptopp-d5ebf62bed594d1fe6ab616a6bbcbcf0a5892d47.tar.gz |
port to MSVC .NET 2005 beta 2
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@198 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'panama.h')
-rw-r--r-- | panama.h | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -14,7 +14,7 @@ class CRYPTOPP_NO_VTABLE Panama { public: void Reset(); - void Iterate(unsigned int count, const word32 *p=NULL, word32 *z=NULL, const word32 *y=NULL); + void Iterate(size_t count, const word32 *p=NULL, word32 *z=NULL, const word32 *y=NULL); protected: typedef word32 Stage[8]; @@ -32,13 +32,13 @@ public: enum {DIGESTSIZE = 32}; PanamaHash() {Panama<B>::Reset();} unsigned int DigestSize() const {return DIGESTSIZE;} - void TruncatedFinal(byte *hash, unsigned int size); + void TruncatedFinal(byte *hash, size_t size); static const char * StaticAlgorithmName() {return B::ToEnum() == BIG_ENDIAN_ORDER ? "Panama-BE" : "Panama-LE";} protected: void Init() {Panama<B>::Reset();} void HashEndianCorrectedBlock(const word32 *data) {this->Iterate(1, data);} // push - unsigned int HashMultipleBlocks(const word32 *input, unsigned int length); + size_t HashMultipleBlocks(const word32 *input, size_t length); }; //! MAC construction using a hermetic hash function @@ -46,7 +46,7 @@ template <class T_Hash, class T_Info = T_Hash> class HermeticHashFunctionMAC : public AlgorithmImpl<SimpleKeyingInterfaceImpl<TwoBases<MessageAuthenticationCode, VariableKeyLength<32, 0, UINT_MAX> > >, T_Info> { public: - void SetKey(const byte *key, unsigned int length, const NameValuePairs ¶ms = g_nullNameValuePairs) + void SetKey(const byte *key, size_t length, const NameValuePairs ¶ms = g_nullNameValuePairs) { m_key.Assign(key, length); Restart(); @@ -58,14 +58,14 @@ public: m_keyed = false; } - void Update(const byte *input, unsigned int length) + void Update(const byte *input, size_t length) { if (!m_keyed) KeyHash(); m_hash.Update(input, length); } - void TruncatedFinal(byte *digest, unsigned int digestSize) + void TruncatedFinal(byte *digest, size_t digestSize) { if (!m_keyed) KeyHash(); @@ -118,8 +118,8 @@ class PanamaCipherPolicy : public AdditiveCipherConcretePolicy<word32, 8>, protected Panama<B> { protected: - void CipherSetKey(const NameValuePairs ¶ms, const byte *key, unsigned int length); - void OperateKeystream(KeystreamOperation operation, byte *output, const byte *input, unsigned int iterationCount); + void CipherSetKey(const NameValuePairs ¶ms, const byte *key, size_t length); + void OperateKeystream(KeystreamOperation operation, byte *output, const byte *input, size_t iterationCount); bool IsRandomAccess() const {return false;} }; |