Thank you for providing the sample values. In that case, how about the following script? Please copy and paste the following script to the script editor of Spreadsheet and save the script.
const SAMPLE = v => Utilities.base64EncodeWebSafe(v.flatMap(r => r.flatMap(c => Utilities.newBlob(c).getBytes())));
When you use this script, please put a custom formula of `=SAMPLE(ARRAYFORMULA(TO_TEXT(A2:A6)))` to a cell. In this case, it is required to give the values as the string type. So ARRAYFORMULA and TO_TEXT are used.
When this script is used for your sample Spreadsheet, when `=SAMPLE(ARRAYFORMULA(TO_TEXT(A2:A6)))` is put to a cell, "Qm9icyBSZWNvcmRzMzEwMTIyMzkzNTAwMDAzMjAyMi0wNC0yNVQxNTozMDowMFoxMDAwLjAwMTUwLjAw" is obtained.