base64decode method should handle standard strings
Roberto Prevato commented
Please also consider that documentation doesn't mention this thing at all: https://docs.microsoft.com/tr-tr/azure/search/search-indexer-field-mappings
"The input is assumed to a URL-safe Base64-encoded string.", which doesn't say anything about the non-standard digit at the end, and about removing the padding char =.