base64 encoding gives some privacy for indexed material. Now I have added password protection for *book64 indeces with 'Password:****|' field. Contents of an index with Password: field cannot be decoded in bookviewerfn without correct password, which is encoded in the contents of the field which cannot be previewed! Not only that but password is entered in a yad --form which adds it's own formatting to the password. ....I recommend users to encode there password in a terminal first, as a hash code or base32/base64 or what-have-you and paste that in field ’Password:*******|’ after ':' no space and terminate in '|'. Then user will need to either remember the 'code' or the original string and the encoding method. Come to think of it, the code method could be added to the password request form. So string entry and coding method, or rather decoding method. which could be a pipe of encodings!
Code: Select all
printf "%q" "$STRING" | md5sum | base32 | base64 | md5sum | base64 | base32
in this case STRING="a\nb" and yields the encoded password string 'LJCFE3CPK5CTGTKEMRVU26SVPFNGUZDIJZVFSM2NK5ETITSUKF4E2V2KNRHVISLZJ5KEKZ2JIMYE
WCQ=' so any characters could be used, afaik. I think it's beyond guessing and would cause a mega-qubit device to burn out. In fact the coding method could be applied to the entire contents of the book and/or the indexed contents.
But thanks to base64 encoding....text formatting and special characters are preserved and displayed, this means the viewer field is good for coding, or accurately saving your code snippets.