blob: f7d9660c37da04c786c8c1da4ae8d9d8a3e4b5a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
// **********************************************************************
//
// Copyright (c) 2002
// MutableRealms, Inc.
// Huntsville, AL, USA
//
// All Rights Reserved
//
// **********************************************************************
#ifndef ICE_CRYPT_KEY_H
#define ICE_CRYPT_KEY_H
#include <IceUtil/Shared.h>
#include <Ice/Stream.h>
#include <Ice/CryptKeyF.h>
namespace IceSecurity
{
namespace SecureUdp
{
using IceUtil::Shared;
using Ice::ByteSeq;
class CryptKey : public Shared
{
public:
CryptKey(const ByteSeq&);
virtual ~CryptKey();
virtual const ByteSeq& toByteSeq() const;
//
// Compare CryptKeys for sorting purposes
//
virtual bool operator==(const CryptKey&) const;
virtual bool operator!=(const CryptKey&) const;
virtual bool operator<(const CryptKey&) const;
protected:
ByteSeq _keyBytes;
};
inline bool operator==(const CryptKey& cryptKey, const CryptKeyPtr& cryptKeyPtr)
{
return (cryptKey == *(cryptKeyPtr.get()));
}
inline bool operator==(const CryptKeyPtr& cryptKeyPtr, const CryptKey& cryptKey)
{
return (cryptKey == *(cryptKeyPtr.get()));
}
}
}
#endif
|