IPKIFNameAndKey.cpp

Go to the documentation of this file.
00001 
00009 #include "IPKIFNameAndKey.h"
00010 #include "Name.h"
00011 #include "Buffer.h"
00012 
00020 IPKIFNameAndKey::IPKIFNameAndKey()
00021 {
00022 }
00030 IPKIFNameAndKey::~IPKIFNameAndKey()
00031 {
00032 }
00040 bool IPKIFNameAndKey::operator==(
00042     const IPKIFNameAndKey& rhs) const
00043 {
00044     bool namesMatch = false;
00045     CPKIFNamePtr thatName = rhs.GetSubjectName();
00046     CPKIFNamePtr thisName = this->GetSubjectName();
00047 
00048     if(thisName != (CPKIFName*)NULL && thatName != (CPKIFName*)NULL)
00049         namesMatch = *thisName == *thatName;
00050 
00051     bool keysMatch = false;
00052     CPKIFBufferPtr thatKey = rhs.GetKey();
00053     CPKIFBufferPtr thisKey = this->GetKey();
00054     if(thisKey != (CPKIFBuffer*)NULL && thatKey != (CPKIFBuffer*)NULL)
00055         keysMatch = *thisKey == *thatKey;
00056     return namesMatch && keysMatch;
00057 }
00058 
00067 bool IPKIFNameAndKey::SameDNSameKey(
00069     const IPKIFNameAndKey& that) const
00070 {
00071     return *this == that;
00072 }

Generated on Mon Nov 15 11:15:51 2010 for PublicKeyInfrastructureFramework(PKIF) by  doxygen 1.5.6