5 #include <glog/logging.h>
12 add_secret(srs_secret
);
15 SRS::~SRS() { srs_free(srs_
); }
17 std::string
SRS::forward(char const* sender
, char const* alias
)
21 char buf
[1024]; // will be of size at most strlen(sender) + strlen(alias) + 64
22 CHECK_EQ(srs_forward(srs_
, buf
, sizeof(buf
), sender
, alias
), SRS_SUCCESS
);
23 return std::string(buf
);
26 std::string
SRS::reverse(char const* sender
)
30 char buf
[1024]; // no longer than sender
31 CHECK_EQ(srs_reverse(srs_
, buf
, sizeof(buf
), sender
), SRS_SUCCESS
);
32 return std::string(buf
);
35 void SRS::add_secret(char const* secret
) { srs_add_secret(srs_
, secret
); }