44 size_t length = encoded_contents.GetLength();
45 size_t max_length = GetMaxLength();
46 if (length <= max_length) {
47 for (size_t i = 0; i < max_length - length; i++)
48 encoded_contents.InsertAtFront(L'0');
50 ByteString str = encoded_contents
.ToUTF8();
52 str
+= '0' + checksum;
53 encoded_contents = WideString
::FromUTF8(str.AsStringView()
);
55 encoded_contents = encoded_contents.First(max_length + 1);
58 return encoded_contents;