~zooko/cryptopp/trunk

« back to all changes in this revision

Viewing changes to algparam.h

  • Committer: weidai
  • Date: 2005-07-12 04:23:32 UTC
  • Revision ID: svn-v4:57ff6487-cd31-0410-9ec3-f628ee90f5f0:trunk/c5:198
port to MSVC .NET 2005 beta 2

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
        {
18
18
                Assign((const byte *)data, data ? strlen(data) : 0, deepCopy);
19
19
        }
20
 
        ConstByteArrayParameter(const byte *data, unsigned int size, bool deepCopy = false)
 
20
        ConstByteArrayParameter(const byte *data, size_t size, bool deepCopy = false)
21
21
        {
22
22
                Assign(data, size, deepCopy);
23
23
        }
27
27
                Assign((const byte *)string.data(), string.size(), deepCopy);
28
28
        }
29
29
 
30
 
        void Assign(const byte *data, unsigned int size, bool deepCopy)
 
30
        void Assign(const byte *data, size_t size, bool deepCopy)
31
31
        {
32
32
                if (deepCopy)
33
33
                        m_block.Assign(data, size);
41
41
 
42
42
        const byte *begin() const {return m_deepCopy ? m_block.begin() : m_data;}
43
43
        const byte *end() const {return m_deepCopy ? m_block.end() : m_data + m_size;}
44
 
        unsigned int size() const {return m_deepCopy ? m_block.size() : m_size;}
 
44
        size_t size() const {return m_deepCopy ? m_block.size() : m_size;}
45
45
 
46
46
private:
47
47
        bool m_deepCopy;
48
48
        const byte *m_data;
49
 
        unsigned int m_size;
 
49
        size_t m_size;
50
50
        SecByteBlock m_block;
51
51
};
52
52
 
60
60
 
61
61
        byte *begin() const {return m_data;}
62
62
        byte *end() const {return m_data + m_size;}
63
 
        unsigned int size() const {return m_size;}
 
63
        size_t size() const {return m_size;}
64
64
 
65
65
private:
66
66
        byte *m_data;
67
 
        unsigned int m_size;
 
67
        size_t m_size;
68
68
};
69
69
 
70
70
class CRYPTOPP_DLL CombinedNameValuePairs : public NameValuePairs