MCPcopy Create free account
hub / github.com/ElementsProject/lightning / b64_decode

Function b64_decode

common/base64.c:18–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16}
17
18u8 *b64_decode(const tal_t *ctx, const char *str, size_t len)
19{
20 size_t dlen = base64_decoded_length(len);
21 u8 *ret = tal_arr(ctx, u8, dlen);
22 if (base64_decode((char *)ret, dlen, str, len) < 0)
23 return tal_free(ret);
24 return ret;
25}

Callers 1

runFunction · 0.85

Calls 3

base64_decoded_lengthFunction · 0.85
base64_decodeFunction · 0.85
tal_freeFunction · 0.85

Tested by

no test coverage detected