| 68 | } |
| 69 | |
| 70 | int 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 | |
| 78 | StringRef encode(Arena& arena, StringRef plainText) { |
| 79 | auto encodedLen = encodedLength(plainText.size()); |
no outgoing calls
no test coverage detected