MCPcopy Create free account
hub / github.com/apache/trafficserver / cryptoBase64Encode

Function cryptoBase64Encode

plugins/experimental/access_control/utils.cc:277–289  ·  view source on GitHub ↗

* @brief Base64 encode * * @param in input buffer to encode * @param inLen input buffer length * @param output buffer * @param output buffer length * @return number of character actually written to the output buffer. */

Source from the content-addressed store, hash-verified

275 * @return number of character actually written to the output buffer.
276 */
277size_t
278cryptoBase64Encode(const char *in, size_t inLen, char *out, size_t outLen)
279{
280 if ((nullptr == in) || (0 == inLen) || (nullptr == out) || 0 == outLen) {
281 return 0;
282 }
283
284 if (!ats_base64_encode(in, inLen, out, outLen, &outLen)) {
285 return 0;
286 }
287
288 return outLen;
289}
290
291/**
292 * @brief Base64 decode

Callers 2

test_utils.ccFile · 0.85

Calls 1

ats_base64_encodeFunction · 0.85

Tested by

no test coverage detected