| 64 | } |
| 65 | |
| 66 | uint8_t* TSasl::wrap(const uint8_t* outgoing, |
| 67 | const int offset, const uint32_t len, uint32_t* outLen) { |
| 68 | uint32_t outputlen; |
| 69 | uint8_t* output; |
| 70 | int result; |
| 71 | |
| 72 | result = sasl_encode(conn, reinterpret_cast<const char*>(outgoing) + offset, len, |
| 73 | const_cast<const char**>(reinterpret_cast<char**>(&output)), &outputlen); |
| 74 | if (result != SASL_OK) { |
| 75 | throw SaslException(sasl_errdetail(conn)); |
| 76 | } |
| 77 | *outLen = outputlen; |
| 78 | return output; |
| 79 | } |
| 80 | |
| 81 | string TSasl::getUsername() { |
| 82 | const char* username; |
no test coverage detected