SyntaxFix
Write A Post
Hire A Developer
Questions
4 * n / 3 gives unpadded length.
4 * n / 3
And round up to the nearest multiple of 4 for padding, and as 4 is a power of 2 can use bitwise logical operations.
((4 * n / 3) + 3) & ~3