MCPcopy Create free account
hub / github.com/apple/foundationdb / encodedLength

Function encodedLength

fdbrpc/Base64UrlEncode.cpp:70–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70int encodedLength(int dataLength) noexcept {
71 auto r = dataLength % 3;
72 if (r == 0)
73 return (dataLength / 3) * 4;
74 else
75 return (dataLength / 3) * 4 + r + 1;
76}
77
78StringRef encode(Arena& arena, StringRef plainText) {
79 auto encodedLen = encodedLength(plainText.size());

Callers 3

encodeFunction · 0.85
makeTokenPartFunction · 0.85
signTokenFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected