How would you see this working? Just providing a way to encode credentials passed to the function, which one could use in a call, or something more involved?
Basic authentication with base64 is not that complicated {or secure

} a few lines of CLR code with ObjectClrNew('System.Text.Encoding') and ObjectClrNew('System.Convert') and I think there is a base64 extender and some older UDF's in the Tech DB. But if it wouldn't be that difficult to package in your Extender it would help with WinHTTP API requests...
user = 'winbatch'
pw = '$ecretF!le'
pair = user:":":pw
request = Createobject("WinHttp.WinHttpRequest.5.1")
request.Open("GET", [myURL], @False )
request.SetRequestHeader("Authorization", "Basic ":base64String(pair))
; etc...etc
where base64String() is your function. I know I will use your Extender for the Json and SQlite functionality with web requests so a function like that would be an extra benefit. But others might not see it that way... so maybe put it up for a vote.