param value export function encodeString ( value ) { return Buffer . from ( value ) . toString ( "base64" ) ; } param value export function encodeByteArray ( value ) { const bufferValue = value instanceof Buffer ? value : Buffer . from ( value . buffer as ArrayBuffer ) ; return bufferValue . toString ( "base64" ) ; } param value export function decodeString ( value ) { return Buffer . from ( value , "base64" ) ; }