SHA 256 is too complex for me to do on spare time.
But for start on Base64, from wiki Man = TWFu
Just as start, miss the code for move the cursor by 3 elements adding necessary "=" padding.
working concept code
{
:local charsString ""
:for x from=0 to=15 step=1 do={ :for y from=0 to=15 step=1 do={
:local tmpHex "$[:pick "0123456789ABCDEF" $x ($x+1)]$[:pick "0123456789ABCDEF" $y ($y+1)]"
:set $charsString "$charsString$[[:parse "(\"\\$tmpHex\")"]]"
} }
:local chr2int do={:if (($1="") or ([:len $1] > 1) or ([:typeof $1] = "nothing")) do={:return -1}; :return [:find $2 $1 -1]}
# RFC 4648 base64 Standard
:local arrb64 [:toarray "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,0,1,2,3,4,5,6,7,8,9,+,/"]
# RFC 4648 base64url URL- and filename-safe standard
:local arrb64url [:toarray "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,0,1,2,3,4,5,6,7,8,9,-,_"]
:local input "Man"
:local v1 [$chr2int [:pick $input 0 1] $charsString]
:local v2 [$chr2int [:pick $input 1 2] $charsString]
:local v3 [$chr2int [:pick $input 2 3] $charsString]
:local f6bit ($v1 >> 2)
:local s6bit ((($v1 & 3) * 16) + ($v2 >> 4))
:local t6bit ((($v2 & 15) * 4) + ($v3 >> 6))
:local q6bit ($v3 & 63)
:put "$input = $($arrb64->$f6bit)$($arrb64->$s6bit)$($arrb64->$t6bit)$($arrb64->$q6bit) on Base64 Standard"
}