10#define RESIPROCATE_SUBSYSTEM Subsystem::SIP
38 this->privateKey = pprivateKey;
48 noncePrivate += timestamp;
53 noncePrivate += privateKey;
54 nonce += noncePrivate.
md5();
62 if (!pb.
eof() && !isdigit(
static_cast< unsigned char >(*pb.
position())))
64 DebugLog(<<
"Invalid nonce; expected timestamp.");
71 DebugLog(<<
"Invalid nonce; expected timestamp terminator.");
75 pb.
data(creationTime, anchor);
Nonce parseNonce(const Data &nonce)
virtual ~BasicNonceHelper()
BasicNonceHelper()
BasicNonceHelper implements the makeNonce function in the same way as the original implementation of ...
Data makeNonce(const SipMessage &request, const Data ×tamp)
void setPrivateKey(const Data &privateKey)
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
uint64_t convertUInt64() const
Takes the contents of the Data and converts them to an unsigned 64-bit integer.
static const PreallocateType Preallocate
used only to disambiguate constructors
size_type size() const noexcept
Returns the number of bytes in this Data.
Data md5(EncodingType type=HEX) const
Computes the MD5 hash of the current data.
const char * data() const noexcept
Returns a pointer to the contents of this Data.
Provides string-parsing functionality with protection from buffer overflow.
CurrentPosition skipToChar(char c)
CurrentPosition position() const
void data(Data &data, const char *start) const
make the passed in data share memory with the buffer (uses Data::Share)
static Data getCryptoRandomHex(unsigned int numBytes)
Represents a SIP message.
const RequestLine & header(const RequestLineType &l) const
Returns the RequestLine. This is only valid for request messages.
static const char * COLON
dcm! – add UnusedChecking(_enum) below;