Calculate required length once and reuse

Created by  AfoHT  on January 21, 2024
Q7IWKL57OWTZL2FQVVC6WH7DCYQYXOLEBFZIZFSRBK7A6K4ZGZDAC
Change contents