8#define RESIPROCATE_SUBSYSTEM Subsystem::SIP
37 this->privateKey = pprivateKey;
51 nonce += md5buf.
md5();
58 if(nonce.
size() != 40)
62 const char *s = nonce.
data();
An alternative to std::string, encapsulates an arbitrary buffer of bytes.
static const PreallocateType Preallocate
used only to disambiguate constructors
Data & append(const char *str, size_type len)
Appends the specified number of bytes to the end of this Data.
size_type size() const noexcept
Returns the number of bytes in this Data.
int convertInt() const
Takes the contents of the Data and converts them to an integer.
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.
static unsigned int hex2integer(const char *_s)
Converts a character string containing a hexidecimal value into an unsigned int.
static void integer2hex(char *_d, unsigned int _s, bool _l=true)
Converts an interger in a character string containing the hexidecimal representation of the integer.
static Data getCryptoRandomHex(unsigned int numBytes)
Nonce parseNonce(const Data &nonce)
Data makeNonce(const SipMessage &request, const Data ×tamp)
virtual ~SERNonceHelper()
void setPrivateKey(const Data &privateKey)
SERNonceHelper(int serOffset)
SERNonceHelper implements the makeNonce function in the same way as SIP Express Router (SER) - http:/...
Represents a SIP message.
dcm! – add UnusedChecking(_enum) below;