>but only implement section 4 of it, but this document also describes "base64url" in section 5.
I started writing the module by looking at Wikipedia =)
I looked into RFC4648 itself later, then I saw a whole bunch of different RFCs, each of which said that we had a modification of aofavit, then they showed me that there are still different ones. I didn’t dare to cover everything. Therefore, I limited myself to only a base of 64-character alphabet, and since they are somewhat different, I added RFC4648 by default plus the ability to specify a different alphabet, the data for encoding is generated later. Simply put, this is basic base64 with the possibility of slight variability.
As far as I understand, Base 64 Encoding with URL differs only in replacing the character in the alphabet, you can specify any alphabet, as long as it has 64 characters and it will be used for encoding and decoding. To implement section 5, you only need to change 1 character in the alphabet.
By default, I have what is in section 4, any other option will need to be specified, I did not embed all the options into the code, this will make it bloat, instead you can simply pass any of your alphabet and the program will generate the necessary data for encoding. It seemed to me that doing this would be more correct, simpler and more flexible.
The default is the standard alphabet, otherwise you need to specify explicitly.
in the description I listed the different alphabets that I could find, there are probably more of them, in any case it’s just 64 any characters.
Maybe it’s worth adding the second alphabet as a ready-made one straight into the code... I don’t know yet. In any case, you can specify what you need manually. It is necessary to clarify that by default there is only 1 encoding/decoding option, and everything else must be indicated explicitly in any case. I'll think about it, thanks for the note
среда, 24 июля 2024 г. в 16:54:13 UTC+3, Sainan: